Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.smes_functionName functionList = new yinxiang.BLL.smes_functionName();
            DataSet ds = new DataSet();

            ds = functionList.GetList_New("");
            this.GridView2.DataSource = ds.Tables[0];
            this.GridView2.DataBind();
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.smes_functionName functionList = new yinxiang.BLL.smes_functionName();
            DataSet ds = new DataSet();

            ds = functionList.GetList_New(@"yx_functionuser_new.username ='******'");
            this.GridView2.DataSource = ds.Tables[0];
            this.GridView2.DataBind();


            // this.Label1.Text = "当前用户为:" + Session["username"];
        }
Ejemplo n.º 3
0
 private void ShowInfo(long functionid)
 {
     yinxiang.BLL.smes_functionName   bll   = new yinxiang.BLL.smes_functionName();
     yinxiang.Model.smes_functionName model = bll.GetModel(functionid);
     this.lblfunctionid.Text    = model.functionid.ToString();
     this.lblorgId.Text         = model.orgId;
     this.lblfunctionName.Text  = model.functionName;
     this.lblfunctionPath.Text  = model.functionPath;
     this.lblfunctionGroup.Text = model.functionGroup;
     this.lblcreater.Text       = model.creater;
     this.lbluseNum.Text        = model.useNum.ToString();
     this.lbllastUser.Text      = model.lastUser;
     this.lbllastUseDate.Text   = model.lastUseDate;
     this.lblmemo.Text          = model.memo;
     this.lblfunctioncode.Text  = model.functioncode;
 }
Ejemplo n.º 4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtorgId.Text.Trim().Length == 0)
            {
                strErr += "orgId不能为空!\\n";
            }
            if (this.txtfunctionName.Text.Trim().Length == 0)
            {
                strErr += "functionName不能为空!\\n";
            }
            if (this.txtfunctionPath.Text.Trim().Length == 0)
            {
                strErr += "functionPath不能为空!\\n";
            }
            if (this.txtfunctionGroup.Text.Trim().Length == 0)
            {
                strErr += "functionGroup不能为空!\\n";
            }
            if (this.txtcreater.Text.Trim().Length == 0)
            {
                strErr += "creater不能为空!\\n";
            }
            if (this.txtuseNum.Text.Trim().Length == 0)
            {
                strErr += "useNum不能为空!\\n";
            }
            if (this.txtlastUser.Text.Trim().Length == 0)
            {
                strErr += "lastUser不能为空!\\n";
            }
            if (this.txtlastUseDate.Text.Trim().Length == 0)
            {
                strErr += "lastUseDate不能为空!\\n";
            }
            if (this.txtmemo.Text.Trim().Length == 0)
            {
                strErr += "memo不能为空!\\n";
            }
            if (this.txtfunctioncode.Text.Trim().Length == 0)
            {
                strErr += "functioncode不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string orgId         = this.txtorgId.Text;
            string functionName  = this.txtfunctionName.Text;
            string functionPath  = this.txtfunctionPath.Text;
            string functionGroup = this.txtfunctionGroup.Text;
            string creater       = this.txtcreater.Text;
            string useNum        = this.txtuseNum.Text;
            string lastUser      = this.txtlastUser.Text;
            string lastUseDate   = this.txtlastUseDate.Text;
            string memo          = this.txtmemo.Text;
            string functioncode  = this.txtfunctioncode.Text;

            yinxiang.Model.smes_functionName model = new yinxiang.Model.smes_functionName();
            model.orgId         = orgId;
            model.functionName  = functionName;
            model.functionPath  = functionPath;
            model.functionGroup = functionGroup;
            model.creater       = creater;
            model.useNum        = 1;
            model.lastUser      = lastUser;
            model.lastUseDate   = lastUseDate;
            model.memo          = memo;
            model.functioncode  = functioncode;

            yinxiang.BLL.smes_functionName bll = new yinxiang.BLL.smes_functionName();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Ejemplo n.º 5
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtorgId.Text.Trim().Length == 0)
            {
                strErr += "orgId不能为空!\\n";
            }
            if (this.txtfunctionName.Text.Trim().Length == 0)
            {
                strErr += "functionName不能为空!\\n";
            }
            if (this.txtfunctionPath.Text.Trim().Length == 0)
            {
                strErr += "functionPath不能为空!\\n";
            }
            if (this.txtfunctionGroup.Text.Trim().Length == 0)
            {
                strErr += "functionGroup不能为空!\\n";
            }
            if (this.txtcreater.Text.Trim().Length == 0)
            {
                strErr += "creater不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtuseNum.Text))
            {
                strErr += "useNum格式错误!\\n";
            }
            if (this.txtlastUser.Text.Trim().Length == 0)
            {
                strErr += "lastUser不能为空!\\n";
            }
            if (this.txtlastUseDate.Text.Trim().Length == 0)
            {
                strErr += "lastUseDate不能为空!\\n";
            }
            if (this.txtmemo.Text.Trim().Length == 0)
            {
                strErr += "memo不能为空!\\n";
            }
            if (this.txtfunctioncode.Text.Trim().Length == 0)
            {
                strErr += "functioncode不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            long   functionid    = long.Parse(this.lblfunctionid.Text);
            string orgId         = this.txtorgId.Text;
            string functionName  = this.txtfunctionName.Text;
            string functionPath  = this.txtfunctionPath.Text;
            string functionGroup = this.txtfunctionGroup.Text;
            string creater       = this.txtcreater.Text;
            long   useNum        = long.Parse(this.txtuseNum.Text);
            string lastUser      = this.txtlastUser.Text;
            string lastUseDate   = this.txtlastUseDate.Text;
            string memo          = this.txtmemo.Text;
            string functioncode  = this.txtfunctioncode.Text;


            yinxiang.Model.smes_functionName model = new yinxiang.Model.smes_functionName();
            model.functionid    = functionid;
            model.orgId         = orgId;
            model.functionName  = functionName;
            model.functionPath  = functionPath;
            model.functionGroup = functionGroup;
            model.creater       = creater;
            model.useNum        = useNum;
            model.lastUser      = lastUser;
            model.lastUseDate   = lastUseDate;
            model.memo          = memo;
            model.functioncode  = functioncode;

            yinxiang.BLL.smes_functionName bll = new yinxiang.BLL.smes_functionName();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }