//绑定所有下拉选框
        private void DPDataBind()
        {
            DataTable dt = proBll.Sel();

            proDP.DataSource     = dt;
            proDP.DataTextField  = "ProcedureName";
            proDP.DataValueField = "ID";
            proDP.DataBind();
            proDP.Items.Insert(0, new ListItem("自由流程", "0"));

            //机密等下拉选框绑定
            Secret.DataSource     = OAConfig.StrToDic(OAConfig.Secret);
            Secret.DataValueField = "Key";
            Secret.DataTextField  = "Value";
            Secret.DataBind();

            Urgency.DataSource     = OAConfig.StrToDic(OAConfig.Urgency);
            Urgency.DataValueField = "Key";
            Urgency.DataTextField  = "Value";
            Urgency.DataBind();

            Importance.DataSource     = OAConfig.StrToDic(OAConfig.Importance);
            Importance.DataValueField = "Key";
            Importance.DataTextField  = "Value";
            Importance.DataBind();
        }
        protected void ProBind()
        {
            DataTable dt = proBll.Sel();

            ProRPT.DataSource = dt;
            ProRPT.DataBind();
        }
Beispiel #3
0
        public ActionResult AddApproval()
        {
            if (!B_User.CheckIsLogged())
            {
                return(null);
            }
            ViewBag.inputer = mu.UserName;
            int                   ID       = DataConverter.CLng(Request["ID"]);
            DataTable             types    = mtBll.Sels();
            List <SelectListItem> nodeList = new List <SelectListItem>();

            nodeList.Add(new SelectListItem {
                Text = "全部", Value = "0"
            });
            foreach (DataRow row in types.Rows)
            {
                nodeList.Add(new SelectListItem {
                    Text = row.Field <string>("TypeName"), Value = row.Field <int>("ID").ToString()
                });
            }
            ViewBag.types = nodeList;
            ViewBag.pros  = mpBll.Sel();
            DataTable dt = maBll.Sel(ID);

            if (dt.Rows.Count > 0)
            {
                ViewBag.content  = dt.Rows[0]["Content"].ToString();
                ViewBag.approver = dt.Rows[0]["Approver"].ToString();
                ViewBag.results  = dt.Rows[0]["Results"].ToString();
            }
            return(View());
        }
        private void DataBind(string key = "")
        {
            DataTable dt = new DataTable();

            dt = prodBll.Sel();
            if (!string.IsNullOrEmpty(key))
            {
                dt.DefaultView.RowFilter = "ProcedureName like '%" + key + "%'";
            }
            EGV.DataSource = dt;
            EGV.DataBind();
        }
Beispiel #5
0
 public void MyBind()
 {
     Egv.DataSource = proceBll.Sel();
     Egv.DataBind();
 }