Esempio n. 1
0
        protected void btnBatch_Click(object sender, EventArgs e)
        {
            string[] sns = hfSelectedSN.Value.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);

            foreach (string sn in sns)
            {
                WorlListBLL workList = new WorlListBLL();
                workList.Approve(sn, "Task Completed", null);
            }

            btnGoPage_Click(sender, e);
            chkBatch.Checked = false;
        }
Esempio n. 2
0
        protected void btnSleep_Click(object sender, EventArgs e)
        {
            string[] sns = hfSelectedSN.Value.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);

            foreach (string sn in sns)
            {
                WorlListBLL workList = new WorlListBLL();
                workList.Sleep(sn, Convert.ToInt32(hfSleep.Value));
            }

            Page.ClientScript.RegisterStartupScript(Page.GetType(), "ss", "alert('休眠成功');", true);
            btnGoPage_Click(sender, e);
        }
Esempio n. 3
0
        protected void btnDelegate_Click(object sender, EventArgs e)
        {
            string[] sns      = hfSelectedSN.Value.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string   toUserAD = hfAdAcount.Value;

            foreach (string sn in sns)
            {
                WorlListBLL workList = new WorlListBLL();
                workList.Delegate(sn, toUserAD);
            }

            Page.ClientScript.RegisterStartupScript(Page.GetType(), "ss", "alert('代理成功');", true);
            btnGoPage_Click(sender, e);
        }
Esempio n. 4
0
        protected void BindData(string PageNum)
        {
            WorlListBLL workListBll = new WorlListBLL();

            ds = workListBll.GetWorkList(PageNum, PageSize, ddlProcess.SelectedValue, CurrentUserAdaccoutWithK2Lable, txtFolio.Text, txtStartDate.Text, txtEndDate.Text, ddlFlowStatus.SelectedValue, hfSubmittor.Value, "");
            if (ds != null && ds.Tables.Count > 2)
            {
                gvMyWorkList.DataSource = ds.Tables[0];
                gvMyWorkList.DataBind();
                divfenye.Visible = ds.Tables[0].Rows.Count > 0 ? true : false;

                txtPageCount.Text = ds.Tables[2].Rows[0]["PageCount"].ToString();
                txtTotalNum.Text  = ds.Tables[2].Rows[0]["TotalNum"].ToString();

                //判断显示
                if (!string.IsNullOrEmpty(txtPageCount.Text.Trim()))
                {
                    int pageCount = int.Parse(txtPageCount.Text.Trim());
                    if (pageCount == 1)
                    {
                        lbFirst.Attributes["style"] = "display:none;";
                        lbPrev.Attributes["style"]  = "display:none;";
                        lbNext.Attributes["style"]  = "display:none;";
                        lbLast.Attributes["style"]  = "display:none;";
                    }
                    else if (pageCount > 0 && PageNum == "1")
                    {
                        lbFirst.Attributes["style"] = "display:none;";
                        lbPrev.Attributes["style"]  = "display:none;";
                        lbNext.Attributes["style"]  = "display:inline;";
                        lbLast.Attributes["style"]  = "display:inline;";
                    }
                    else if (pageCount > 0 && PageNum == pageCount.ToString())
                    {
                        lbNext.Attributes["style"]  = "display:none;";
                        lbLast.Attributes["style"]  = "display:none;";
                        lbFirst.Attributes["style"] = "display:inline;";
                        lbPrev.Attributes["style"]  = "display:inline;";
                    }
                    else
                    {
                        lbFirst.Attributes["style"] = "display:inline;";
                        lbPrev.Attributes["style"]  = "display:inline;";
                        lbNext.Attributes["style"]  = "display:inline;";
                        lbLast.Attributes["style"]  = "display:inline;";
                    }
                }
            }
        }
Esempio n. 5
0
        private void SetTaskAmount()
        {
            DataSet     ds;
            WorlListBLL bll = new WorlListBLL();

            //取得任务数量
            ds = bll.GetMyWorklist(CurrentUserAdaccoutWithK2Lable, "1", "12", "", "", "''", "", "", "", "", "");
            if (ds != null && ds.Tables.Count >= 3)
            {
                hfMyWorklist.Value = ds.Tables[2].Rows[0]["TotalNum"].ToString();
            }
            else
            {
                hfMyWorklist.Value = "0";
            }
        }