Exemple #1
0
 protected override string UpdateData()
 {
     RDFNew.Module.Admin.Sys.Sys_Role obj = new RDFNew.Module.Admin.Sys.Sys_Role();
     string Keyword = Request.QueryString["keyword"];
     object[] data = obj.GetMaster(Keyword);
     if (data[0].ToString() == "0") //正常
     {
         DataTable dt = data[1] as DataTable;
         if (dt.Rows.Count > 0)
         {
             DataRow dr;
             dr = dt.Rows[0];
             dr["Seq"] = App_Com.Helper.InputText(this.txtSeq.Text, 500);
             dr["RoleName"] = App_Com.Helper.InputText(this.txtRoleName.Text, 500);
             dr["Enabled"] = this.ckbEnabled.Checked;
             dr["Remark"] = App_Com.Helper.InputText(this.txtRemark.Text, 500);
             dr["ModBy"] = App_Com.Sys_User.GetUserInfo("UserID");
             dr["ModOn"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
             data = obj.ApplyMaster(dt.GetChanges(DataRowState.Modified),
                 BuildSys_User(),
                 BuildSys_ModuleF(),
                 App_Com.Helper.BuildLog("Sys_Role", "edit"));
             if (data[0].ToString() != "0") //正常
                 throw data[1] as Exception;
             else
                 return data[1].ToString();
         }
         else
         {
             throw new Exception("需要修改的记录已不存在,请刷新后再试.");
         }
     }
     else
     {
         throw data[1] as Exception;
     }
 }