Example #1
0
        protected override string AddData()
        {
            RDFNew.Module.Admin.Flow.Flow_Org obj = new RDFNew.Module.Admin.Flow.Flow_Org();
            DataTable dt = RDFNew.Module.DALHelper.GetMasterEmpty(null, "Flow_Org");
            DataRow dr;
            dr = dt.NewRow();
            dr["OrgID"] = App_Com.Helper.InputText(this.txtOrgID.Text, 500);
            dr["OrgName"] = App_Com.Helper.InputText(this.txtOrgName.Text, 500);
            dr["RoleID"] = App_Com.Helper.InputText(this.hidRoleID.Text, 500);
            dr["JobID"] = this.ddlJobID.SelectedItem.Value;
            dr["PID"] = this.hidPID.Text;
            dr["Remark"] = App_Com.Helper.InputText(this.txtRemark.Text, 500);

            dr["CrtBy"] = App_Com.Sys_User.GetUserInfo("UserID");
            dr["CrtOn"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            dt.Rows.Add(dr);
            object[] data = obj.ApplyMaster(dt.GetChanges(DataRowState.Added), BuildSub(),
                                        App_Com.Helper.BuildLog("Flow_Org", "add"));
            if (data[0].ToString() != "0") //正常
                throw data[1] as Exception;
            else
                return data[1].ToString();
        }
Example #2
0
        protected override string UpdateData()
        {
            RDFNew.Module.Admin.Flow.Flow_Org obj = new RDFNew.Module.Admin.Flow.Flow_Org();
            object[] data = obj.GetMaster(B_Keyword);
            if (data[0].ToString() == "0") //正常
            {
                DataTable dt = data[1] as DataTable;
                if (dt.Rows.Count > 0)
                {
                    DataRow dr;
                    dr = dt.Rows[0];
                    dr["OrgName"] = App_Com.Helper.InputText(this.txtOrgName.Text, 500);
                    dr["RoleID"] = App_Com.Helper.InputText(this.hidRoleID.Text, 500);
                    dr["JobID"] = this.ddlJobID.SelectedItem.Value;
                    dr["PID"] = this.hidPID.Text;
                    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), BuildSub(),
                                            App_Com.Helper.BuildLog("Flow_Org", "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;
            }
        }
Example #3
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     B_ModuleID = "Flow_Org";
     B_ModuleName = "组织";
     B_ToolBar1 = this.Toolbar1;
     B_IDAL = new RDFNew.Module.Admin.Flow.Flow_Org();
 }
Example #4
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     B_ModuleID = "Flow_Org";
     B_ModuleName = "组织";
     B_PageDetail = "Flow_Org.aspx";
     B_ToolBar1 = this.Toolbar1;
     B_Window1 = this.Window1;
     B_Grid1 = this.Grid1;
     B_IDAL = new RDFNew.Module.Admin.Flow.Flow_Org();
     B_TableKey = "Flow_Org.OrgID";
     B_OrderBy = " Flow_Org.RID ";
 }