Please show me how to pass it in query string or Store it in Session from my calendarselectionchanged code. That's the part I am confuse about. I dont' know where to begin.
OracleConnection myConnection = new OracleConnection(ConfigurationManager.AppSettings["DSN"]);
OracleCommand myCommand = new OracleCommand("SELECT to_date(a.PROJECT_DUE,'MM/DD/YYYY'), PROJECT_NAME FROM NEW_PROJECTS a WHERE upper(a.REPORTS_TO_ID) = '" + Session["UserName"].ToString() + "'or lower(a.REPORTS_TO_ID) = '" + Session["UserName"].ToString()
+ "' or upper(a.ASSIGNED_TO_ID) = '" + Session["UserName"].ToString() + "'or lower(a.ASSIGNED_TO_ID) = '" + Session["UserName"].ToString() + "'and a.proj_status = 'Active'", myConnection);
OracleDataReader dr;
myConnection.Open();
dr = myCommand.ExecuteReader();
while (dr.Read())
{
//assign the calendar control dates already contained in the database
string d1;
d1 = e.Day.Date.ToString("MM/dd/yyyy");
Calendar1.SelectedDates.Add((DateTime)dr.GetOracleDateTime(0));
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Display user name in the header when logged in
Nov 11, 2009 02:11 AM|LINK
As I alreay told you, you can pass it in query string or Store it in Session so that you can access it on another page
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Cadeey
Member
102 Points
55 Posts
Re: Display user name in the header when logged in
Nov 11, 2009 08:09 PM|LINK
Please show me how to pass it in query string or Store it in Session from my calendarselectionchanged code. That's the part I am confuse about. I dont' know where to begin.
Cadeey
Member
102 Points
55 Posts
Re: Display user name in the header when logged in
Nov 11, 2009 09:43 PM|LINK
Hey Chetan-
Please disregard this message. I've solved the problem..........YEEEEEY....WHEW!
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Display user name in the header when logged in
Nov 12, 2009 02:03 AM|LINK
Thats nice, you solved the problem. Cabn you just let me know how you solved I mean using QueryString or Session
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Cadeey
Member
102 Points
55 Posts
Re: Display user name in the header when logged in
Nov 12, 2009 01:23 PM|LINK
I've used QueryString.
Cadeey
Member
102 Points
55 Posts
Re: Display user name in the header when logged in
Nov 12, 2009 09:10 PM|LINK
I got one more question: How do I display project names that's stored in database in my calendar.
Here's my code-behind (CalendarDayRender):
protected void Calender1_DayRender(object source, DayRenderEventArgs e)
{
// Declare the query string.
OracleConnection myConnection = new OracleConnection(ConfigurationManager.AppSettings["DSN"]);
OracleCommand myCommand = new OracleCommand("SELECT to_date(a.PROJECT_DUE,'MM/DD/YYYY'), PROJECT_NAME FROM NEW_PROJECTS a WHERE upper(a.REPORTS_TO_ID) = '" + Session["UserName"].ToString() + "'or lower(a.REPORTS_TO_ID) = '" + Session["UserName"].ToString() + "' or upper(a.ASSIGNED_TO_ID) = '" + Session["UserName"].ToString() + "'or lower(a.ASSIGNED_TO_ID) = '" + Session["UserName"].ToString() + "'and a.proj_status = 'Active'", myConnection);
OracleDataReader dr;
myConnection.Open();
dr = myCommand.ExecuteReader();
while (dr.Read())
{
//assign the calendar control dates already contained in the database
string d1;
d1 = e.Day.Date.ToString("MM/dd/yyyy");
Calendar1.SelectedDates.Add((DateTime)dr.GetOracleDateTime(0));
e.Cell.Text = "<a href='edit_project.aspx?PROJECT_DUE=" + d1 + "'>" + e.Day.DayNumberText + "</a>";
}
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Display user name in the header when logged in
Nov 13, 2009 02:02 AM|LINK
What do you mean by this
How do I display project names that's stored in database in my calendar.
Do you want to show Project name in Calendar along with dates
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Cadeey
Member
102 Points
55 Posts
Re: Display user name in the header when logged in
Nov 13, 2009 09:31 PM|LINK
yes, that's what I mean. I'm pulling the project name from the database.
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Display user name in the header when logged in
Nov 16, 2009 02:12 AM|LINK
I am not sure if we can show the project name in calendar. May br for that you need third party control
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Display user name in the header when logged in
Nov 18, 2009 02:08 AM|LINK
Any updates on this
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.