当前位置: 首页>>代码示例>>C#>>正文


C# Logic.GetAllCompletedTasks方法代码示例

本文整理汇总了C#中Logic.GetAllCompletedTasks方法的典型用法代码示例。如果您正苦于以下问题:C# Logic.GetAllCompletedTasks方法的具体用法?C# Logic.GetAllCompletedTasks怎么用?C# Logic.GetAllCompletedTasks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logic的用法示例。


在下文中一共展示了Logic.GetAllCompletedTasks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Redirect("~/Login.aspx");

        }
        else
        {
            if (!Page.IsPostBack)
            {
                Logic lo = new Logic();
                Label lb = Page.Master.FindControl("lbTitle") as Label;
                lb.Text = "Welcome, to Task Manager Web App";
                lb.ForeColor = Color.Black;

                Label user = Page.Master.FindControl("lbUsername") as Label;
                string u = Session["username"].ToString();
                Person pp = lo.GetPerson(u);
                user.Text = pp.Username;

                int pend, complete, total;
                TaskManagerModelContainer db = new TaskManagerModelContainer();
                pend = lo.GetAllPendingTasks(pp.Id).Count;
                complete = lo.GetAllCompletedTasks(pp.Id).Count;
                total = lo.GetAllTasks(pp.Id).Count;

                Label1.Text = pend.ToString() + " Task(s) Pending";
                Label2.Text = complete.ToString() + " Task(s) Completed";
                Label3.Text = total.ToString() + " Task(s) in Total";
            }
        }
    }
开发者ID:imostom,项目名称:TaskManager,代码行数:33,代码来源:Default.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Redirect("~/Login.aspx");

        }
        else
        {
            if (!Page.IsPostBack)
            {
                Logic lo = new Logic();
                Label lb = Page.Master.FindControl("lbTitle") as Label;
                lb.Text = "Completed Tasks";
                lb.ForeColor = Color.Black;

                Label user = Page.Master.FindControl("lbUsername") as Label;
                string u = Session["username"].ToString();
                Person pp = lo.GetPerson(u);
                user.Text = pp.Username;

                TaskManagerModelContainer db = new TaskManagerModelContainer();
                //Logic lo = new Logic();
                Pendin p = new Pendin();
                List<Taskk> ts = lo.GetAllCompletedTasks(pp.Id);
                List<Pendin> pen = new List<Pendin>();
                List<string> fr = new List<string>();
                for (int i = 0; i < ts.Count; i++)
                {
                    fr.Add(ts[i].Title);
                }

                drpTitles.DataSource = fr;
                drpTitles.DataBind();

            }
        }
    }
开发者ID:imostom,项目名称:TaskManager,代码行数:38,代码来源:CompletedTasks.aspx.cs


注:本文中的Logic.GetAllCompletedTasks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。