Esempio n. 1
0
        protected override string UpdateData()
        {
            RDFNew.Module.Admin.Flow.Flow_Job obj = new RDFNew.Module.Admin.Flow.Flow_Job();
            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["JobName"] = App_Com.Helper.InputText(this.txtJobName.Text, 500);
                    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),
                                            App_Com.Helper.BuildLog("Flow_Job", "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;
            }
        }
Esempio n. 2
0
        protected override void FillControlData()
        {
            RDFNew.Module.Admin.Flow.Flow_Job da = new RDFNew.Module.Admin.Flow.Flow_Job();
            this.ddlJobID.DataSource = da.GetMaster(new RDFNew.Module.DALEntity.QuerySet())[1] as DataTable;
            this.ddlJobID.DataValueField = "JobID";
            this.ddlJobID.DataTextField = "JobName";
            this.ddlJobID.DataBind();

            if (B_Action.ToLower() == "add" || B_Action.ToLower() == "edit")
            {
                this.txtRoleName.OnClientTriggerClick = Window1.GetSaveStateReference(
                this.hidRoleID.ClientID, this.txtRoleName.ClientID)
                        + Window1.GetShowReference("../../Sys/Role/Sys_RoleList.aspx?action=select");

                this.txtPOrgID.OnClientTriggerClick = Window1.GetSaveStateReference(
                this.txtPOrgID.ClientID, this.txtPOrgName.ClientID, this.hidPID.ClientID)
                        + Window1.GetShowReference("Flow_OrgList.aspx?action=select");
            }

            if (B_Action.ToLower() == "add")
            {
                this.txtPOrgID.Text = Request.QueryString["ParentID"];
                this.txtPOrgName.Text = Request.QueryString["ParentName"];
                this.txtPOrgName.Text = Server.UrlDecode(this.txtPOrgName.Text);
                this.hidPID.Text = Request.QueryString["ParentRID"];
            }
        }
Esempio n. 3
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     B_ModuleID = "Flow_Job";
     B_ModuleName = "职位";
     B_ToolBar1 = this.Toolbar1;
     B_IDAL = new RDFNew.Module.Admin.Flow.Flow_Job();
 }
Esempio n. 4
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     B_ModuleID = "Flow_Job";
     B_ModuleName = "职位";
     B_PageDetail = "Flow_Job.aspx";
     B_ToolBar1 = this.Toolbar1;
     B_Window1 = this.Window1;
     B_Grid1 = this.Grid1;
     B_IDAL = new RDFNew.Module.Admin.Flow.Flow_Job();
     B_TableKey = "Flow_Job.JobID";
     B_OrderBy = " Flow_Job.JobID ";
 }
Esempio n. 5
0
        protected override string AddData()
        {
            RDFNew.Module.Admin.Flow.Flow_Job obj = new RDFNew.Module.Admin.Flow.Flow_Job();
            DataTable dt = RDFNew.Module.DALHelper.GetMasterEmpty(null, "Flow_Job");
            DataRow dr;
            dr = dt.NewRow();
            dr["JobID"] = App_Com.Helper.InputText(this.txtJobID.Text, 500);
            dr["JobName"] = App_Com.Helper.InputText(this.txtJobName.Text, 500);
            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),
                                        App_Com.Helper.BuildLog("Flow_Job", "add"));
            if (data[0].ToString() != "0") //正常
                throw data[1] as Exception;
            else
                return data[1].ToString();
        }