Ejemplo n.º 1
0
    protected void GetPageData()
    {
        SalaryGAModel model        = this.sga.GetModel(this.rid);
        userManageDb  userManageDb = new userManageDb();

        this.txtUserCode.Text = userManageDb.GetUserName(model.UserCode);
        this.txtRemark.Text   = model.Remark;
        this.DBApplyDate.Text = model.ApplyDate.ToString();
    }
Ejemplo n.º 2
0
        public int Update(SalaryGAModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update HR_Salary_GroupAdjust set ");
            builder.Append("AuditState=" + model.AuditState + ",");
            builder.Append("ApplyDate='" + model.ApplyDate + "',");
            builder.Append("Remark='" + model.Remark + "',");
            builder.Append("UserCode='" + model.UserCode + "',");
            builder.Append("RecordDate='" + model.RecordDate + "',");
            builder.Append("IsConfirm='" + model.IsConfirm + "'");
            builder.Append(" where RecordID='" + model.RecordID + "' ");
            return(publicDbOpClass.ExecSqlString(builder.ToString()));
        }
Ejemplo n.º 3
0
        public int Add(SalaryGAModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into HR_Salary_GroupAdjust(");
            builder.Append("AuditState,ApplyDate,Remark,UserCode,RecordDate,IsConfirm");
            builder.Append(")");
            builder.Append(" values (");
            builder.Append(model.AuditState + ",");
            builder.Append("'" + model.ApplyDate + "',");
            builder.Append("'" + model.Remark + "',");
            builder.Append("'" + model.UserCode + "',");
            builder.Append("'" + model.RecordDate + "',");
            builder.Append("'" + model.IsConfirm + "'");
            builder.Append(")");
            return(publicDbOpClass.ExecSqlString(builder.ToString()));
        }
Ejemplo n.º 4
0
    protected void GetPageData()
    {
        SalaryGAModel model        = this.sga.GetModel(this.InstanceCode);
        userManageDb  userManageDb = new userManageDb();

        this.LbUserCode.Text  = userManageDb.GetUserName(model.UserCode);
        this.LbRemark.Text    = model.Remark;
        this.LbApplyDate.Text = model.ApplyDate.ToString();
        SqlDataSource expr_65       = this.SqGroupAdjustDetail;
        object        selectCommand = expr_65.SelectCommand;

        expr_65.SelectCommand = string.Concat(new object[]
        {
            selectCommand,
            " WHERE [RecordID] = '",
            this.InstanceCode,
            "' "
        });
        this.GVGroupAdjustDetail.DataBind();
    }
Ejemplo n.º 5
0
        public SalaryGAModel GetModel(Guid RecordID)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("select   ");
            builder.Append(" RecordID,AuditState,ApplyDate,Remark,UserCode,RecordDate,IsConfirm ");
            builder.Append(" from HR_Salary_GroupAdjust ");
            builder.Append(" where RecordID='" + RecordID + "' ");
            SalaryGAModel model = new SalaryGAModel();
            DataSet       set   = publicDbOpClass.DataSetQuary(builder.ToString());

            if (set.Tables[0].Rows.Count <= 0)
            {
                return(null);
            }
            if (set.Tables[0].Rows[0]["RecordID"].ToString() != "")
            {
                model.RecordID = new Guid(set.Tables[0].Rows[0]["RecordID"].ToString());
            }
            if (set.Tables[0].Rows[0]["AuditState"].ToString() != "")
            {
                model.AuditState = new int?(int.Parse(set.Tables[0].Rows[0]["AuditState"].ToString()));
            }
            if (set.Tables[0].Rows[0]["ApplyDate"].ToString() != "")
            {
                model.ApplyDate = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["ApplyDate"].ToString()));
            }
            model.Remark   = set.Tables[0].Rows[0]["Remark"].ToString();
            model.UserCode = set.Tables[0].Rows[0]["UserCode"].ToString();
            if (set.Tables[0].Rows[0]["RecordDate"].ToString() != "")
            {
                model.RecordDate = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["RecordDate"].ToString()));
            }
            model.IsConfirm = set.Tables[0].Rows[0]["IsConfirm"].ToString();
            return(model);
        }