Beispiel #1
0
    protected void AllNonProjectsLB_Click(object sender, EventArgs e)
    {
        int projectID = -1;
        int userID = (int)Session["userID"];

        TasksBLL tasks = new TasksBLL();
        TimeKeeper.TasksDataTable task = tasks.GetTasksByProjectIDByUserID(-1, userID);

        decimal NonProjectTime = tasks.TotalTimeByUserIDByProjectID(userID, projectID);

        ByUserGridView.DataSource = task;
        ByUserGridView.DataBind();

        Output.Text = "They have worked " + NonProjectTime + " hrs non-project time since using TimeKeeper.";
    }
    protected void AllNonProjectsLB_Click(object sender, EventArgs e)
    {
        int projectID = -1;
        int userID    = (int)Session["userID"];

        TasksBLL tasks = new TasksBLL();

        TimeKeeper.TasksDataTable task = tasks.GetTasksByProjectIDByUserID(-1, userID);

        decimal NonProjectTime = tasks.TotalTimeByUserIDByProjectID(userID, projectID);

        ByUserGridView.DataSource = task;
        ByUserGridView.DataBind();

        Output.Text = "They have worked " + NonProjectTime + " hrs non-project time since using TimeKeeper.";
    }
Beispiel #3
0
    protected void ProjectsDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ProjectsDropDownList.SelectedValue != "None")
        {
            int projectID = Convert.ToInt32(ProjectsDropDownList.SelectedValue);
            int userID    = (int)Session["userID"];

            TasksBLL tasks = new TasksBLL();
            TimeKeeper.TasksDataTable task = tasks.GetTasksByProjectIDByUserID(projectID, userID);

            decimal ProjectTime = tasks.TotalTimeByUserIDByProjectID(userID, projectID);

            ByProjectGridView.DataSource = task;
            ByProjectGridView.DataBind();

            Output.Text = "You have worked " + ProjectTime.ToString() + " hrs on the " + ProjectsDropDownList.SelectedItem.Text + " project";
            MainMultiView.ActiveViewIndex = 1;
        }
        else
        {
            Server.Transfer("Reports.aspx");
        }
    }
    protected void ProjectsDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ProjectsDropDownList.SelectedValue != "None")
        {
            int projectID = Convert.ToInt32(ProjectsDropDownList.SelectedValue);
            int userID = (int)Session["userID"];

            TasksBLL tasks = new TasksBLL();
            TimeKeeper.TasksDataTable task = tasks.GetTasksByProjectIDByUserID(projectID, userID);

            decimal ProjectTime = tasks.TotalTimeByUserIDByProjectID(userID, projectID);

            ByProjectGridView.DataSource = task;
            ByProjectGridView.DataBind();

            Output.Text = "You have worked " + ProjectTime.ToString() + " hrs on the " + ProjectsDropDownList.SelectedItem.Text + " project";
            MainMultiView.ActiveViewIndex = 1;
        }
        else
            Server.Transfer("Reports.aspx");
    }