예제 #1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int[] intRowindexarray = mainGrid.SelectedRowIndexArray;

            if (intRowindexarray.Length > 0)
            {
                xparams  x     = new xparams();
                object[] keys  = mainGrid.DataKeys[intRowindexarray[0]];
                string   strID = keys[0].ToString();

                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("ID", " cast(ID as varchar(36))='" + strID + "' ");

                int intresult = x.deletebycondition("xparams", dic);

                setPageContent(5);

                Alert alert = new Alert();

                if (intresult > 0)
                {
                    alert.Icon    = Icon.Information;
                    alert.Message = "成功移除数据";
                }
                else
                {
                    alert.MessageBoxIcon = MessageBoxIcon.Error;
                    alert.Message        = "数据移除失败";
                }

                alert.Show();
            }
        }
        private void initauditindicator()
        {
            xparams x = new xparams();

            string str = x.getparamData("H018");

            iname.DataSource = commonLib.stringTolist(str, ',');
            iname.DataBind();
        }
        private void initauditperson()
        {
            xparams x = new xparams();

            string str = x.getparamData("H009");

            auditperson.DataSource = commonLib.stringTolist(str, ',');
            auditperson.DataBind();
        }
        private void initdropSex()
        {
            xparams x = new xparams();

            string str = x.getparamData("H002");

            sex.DataSource = commonLib.stringTolist(str, ',');
            sex.DataBind();
        }
예제 #5
0
        private void initexaminer()
        {
            xparams x = new xparams();

            string str = x.getparamData("H009");

            examiner.DataSource = commonLib.stringTolist(str, ',');
            examiner.DataBind();
        }
예제 #6
0
        private void initunit()
        {
            xparams x = new xparams();

            string str = x.getparamData("H021");

            hdstatu.DataSource = commonLib.stringTolist(str, ',');
            hdstatu.DataBind();

            hdstatu.SelectedIndex = 0;
        }
예제 #7
0
        private void initunit()
        {
            xparams x = new xparams();

            string str = x.getparamData("H003");

            conpduint.DataSource = commonLib.stringTolist(str, ',');
            conpduint.DataBind();

            conpduint.SelectedIndex = 3;
        }
예제 #8
0
        private void initinfo(string strID)
        {
            xparams x = new xparams();

            System.Data.DataTable dt = x.getEditdata(strID);

            DataRow r = dt.Rows[0];

            editID.Text     = strID;
            paramcode.Text  = r["paramcode"].ToString().Trim();
            paramname.Text  = r["paramname"].ToString().Trim();;
            paramvalue.Text = r["paramvalue"].ToString().Trim();;
        }
        private void initdesignperson()
        {
            xparams x = new xparams();

            string str = x.getparamData("H010");

            normalperson.DataSource = commonLib.stringTolist(str, ',');
            normalperson.DataBind();

            approveperson.DataSource = commonLib.stringTolist(str, ',');
            approveperson.DataBind();

            designperson.DataSource = commonLib.stringTolist(str, ',');
            designperson.DataBind();
        }
예제 #10
0
        private void initdesigner()
        {
            xparams x = new xparams();

            string str = x.getparamData("H010");

            designer.DataSource = commonLib.stringTolist(str, ',');
            designer.DataBind();

            stanarder.DataSource = commonLib.stringTolist(str, ',');
            stanarder.DataBind();

            drawer.DataSource = commonLib.stringTolist(str, ',');
            drawer.DataBind();

            checker.DataSource = commonLib.stringTolist(str, ',');
            checker.DataBind();
        }
예제 #11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> dic = initDatadic();
            string  strID     = editID.Text.ToString().Trim();
            xparams x         = new xparams();
            int     intresult = 0;

            if (strID == "")
            {
                dic.Add("ID", Guid.NewGuid().ToString());

                intresult = x.add(dic, "xparams");
            }
            else
            {
                intresult = x.update(dic, "xparams", "ID", strID);
            }

            if (CurPage.Text.Trim() == "")
            {
                setPageContent(1);
            }
            else
            {
                setPageContent(5);
            }

            Alert alert = new Alert();

            if (intresult == 1)
            {
                //连续新增更新代码
                paramcode.Text = newCode().Trim();
                alert.Icon     = Icon.Information;
                alert.Message  = "数据保存成功";
            }
            else
            {
                alert.MessageBoxIcon = MessageBoxIcon.Error;
                alert.Message        = "数据保存失败";
            }

            alert.Show();
        }
예제 #12
0
        private string newCode()
        {
            xparams x            = new xparams();
            string  strparamcode = x.getCodedata();

            if (strparamcode.Length == 1)
            {
                strparamcode = "H00" + strparamcode;
            }
            else if (strparamcode.Length == 2)
            {
                strparamcode = "H0" + strparamcode;
            }
            else
            {
                strparamcode = "H" + strparamcode;
            }

            return(strparamcode);
        }
예제 #13
0
        private void displaydetailinfo(string strID)
        {
            xparams x = new xparams();

            System.Data.DataTable dt = x.getEditdata(strID);

            string strhtml = "空白详细信息";

            if (dt != null && dt.Rows.Count > 0)
            {
                System.Data.DataRow r = dt.Rows[0];
                strhtml = "<div style=\"line-height:27px;\">" +
                          "参数名:" + r["paramname"].ToString().Trim() + "<br/>" +
                          "代码:" + r["paramcode"].ToString().Trim() + "<br/>" +
                          "<div style=\"word-break:break-all;\">参数值:" + r["paramvalue"].ToString().Trim() + "</div>" +
                          "ID:" + r["ID"].ToString().Trim() + "<br/>" +
                          "</div>";
            }

            detailinfo.Text = strhtml;
        }
예제 #14
0
        private void BindGrid()
        {
            string strf_paramname  = f_paramname.Text.Trim();
            string strf_paramvalue = f_paramvalue.Text.Trim();

            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("paramname", strf_paramname);
            dic.Add("paramvalue", strf_paramvalue);

            int    intPageindex     = Convert.ToInt32(CurPage.Text.Trim());
            int    intPagesize      = Convert.ToInt32(GridPageSize.Text.Trim());
            string strSort          = mainGrid.SortField;
            string strSortDirection = mainGrid.SortDirection;

            xparams   x   = new xparams();
            DataTable dt  = x.getBindDataAsdt(dic, strSort, strSortDirection, intPagesize, intPageindex);
            DataTable dt1 = x.getBindDataAsdt(dic, strSort, strSortDirection);

            TotalPage.Text = dt1.Rows.Count.ToString();

            mainGrid.DataSource = dt;
            mainGrid.DataBind();
        }
예제 #15
0
 void setDropListInit()
 {
     string[] stypes = new xparams().getparamData("h011").Split(',');
     stype.DataSource = stypes;
     stype.DataBind();
 }