The URL you send me give me partial of what I was looking for. I am able to display project due dates on the calendar but I am not able to do that based on loging username.
I need couple of things to happen:
1) Employee logs in then views his/her own projects
if (!Page.IsPostBack)
{
//calls the bind method
BindData();
}
}
protected void BindData()
{
OracleConnection myConnection = new OracleConnection(ConfigurationManager.AppSettings["DSN"]);
OracleCommand myCommand = new OracleCommand("SELECT DISTINCT a.PROJECT_DUE FROM NEW_PROJECTS a, REGISTER b WHERE b.USER_NAME = '" + Session["UserName"]+ "'", myConnection);
myCommand.CommandType = CommandType.Text;
myConnection.Open();
OracleDataReader dr = myCommand.ExecuteReader();
while(dr.Read()==true)
{
//assign the calendar control dates already contained in the database
Calendar1.SelectedDates.Add((DateTime) dr.GetOracleDateTime(0));
}
dr.Close();
myConnection.Close();
}
For example, if i login as Cadeey it should only give me all active projects assigned to Cadeey. At the moment it is displaying all projects assigned to everyone when Cadeey logins in. Also, I would like for a teacher to view all assigned employees projects.
Below are the two tables I am using to accomplish this task.
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 11, 2009 03:00 AM|LINK
Try this
bool blnAuthenticate = Authenticate(username.Text.Tostring().ToLower(), password.Text);
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
Sep 11, 2009 08:38 PM|LINK
Your solution works however if I have username first character as Upper and the rest Lower how would I do that?
For example: Cadeey
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 14, 2009 03:15 AM|LINK
It will also work in that case
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
Sep 17, 2009 08:22 PM|LINK
hi chetan, did you receive my last message regarding the calendar display?
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 18, 2009 02:44 AM|LINK
Yes, for that requirement I will suggest take a look at
http://www.telerik.com/products/aspnet-ajax/calendar.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 22, 2009 03:29 AM|LINK
Have you looked into the url I provided, does it matches to your requirement
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
Sep 22, 2009 09:23 PM|LINK
The URL you send me give me partial of what I was looking for. I am able to display project due dates on the calendar but I am not able to do that based on loging username.
I need couple of things to happen:
1) Employee logs in then views his/her own projects
This is my code behind for the calendar so far.
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "Welcome, " + Session["UserName"].ToString();
if (!Page.IsPostBack)
{
//calls the bind method
BindData();
}
}
protected void BindData()
{
OracleConnection myConnection = new OracleConnection(ConfigurationManager.AppSettings["DSN"]);
OracleCommand myCommand = new OracleCommand("SELECT DISTINCT a.PROJECT_DUE FROM NEW_PROJECTS a, REGISTER b WHERE b.USER_NAME = '" + Session["UserName"]+ "'", myConnection);
myCommand.CommandType = CommandType.Text;
myConnection.Open();
OracleDataReader dr = myCommand.ExecuteReader();
while(dr.Read()==true)
{
//assign the calendar control dates already contained in the database
Calendar1.SelectedDates.Add((DateTime) dr.GetOracleDateTime(0));
}
dr.Close();
myConnection.Close();
}
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 23, 2009 03:06 AM|LINK
I am able to display project due dates on the calendar but I am not able to do that based on loging username
can you explain ? is query retrun perfect record that you want
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
Sep 23, 2009 01:28 PM|LINK
For example, if i login as Cadeey it should only give me all active projects assigned to Cadeey. At the moment it is displaying all projects assigned to everyone when Cadeey logins in. Also, I would like for a teacher to view all assigned employees projects. Below are the two tables I am using to accomplish this task.
Table 1 = NEW_ASSIGNMENT:
PROJECT
DUE DATE
REQUESTER
DESCRIPTION
CATEGORY
STATUS
ASSIGNED TO
TEST
9/23/09
Teacher
TEST1
Biology
Active
Cadeey
Table 2 = REGISTRATION:
FIRST NAME
LAST NAME
EMAIL
USER_NAME
PASSWORD
CONFIRM_PASSWORD
STUDENT_ID
REPORTS_TO
CADEEY
CAD
CADEEY@HOTMAIL.COM
CADEEY
TEST123
Active
12345
DR.JOE
chetan.sarod...
All-Star
65719 Points
11133 Posts
Re: Display user name in the header when logged in
Sep 24, 2009 03:06 AM|LINK
I think this can be done using Role assignment, for whom to display all project (loke Project Manager) and for Employee only displaytheir project
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.