protected void btnIssuePay_Click(object sender, EventArgs e) { SalaryIPIModel salaryIPIModel = new SalaryIPIModel(); salaryIPIModel.CorpCode = this.CorpCode; salaryIPIModel.IsIssuePay = "1"; salaryIPIModel.IssueMonth = Convert.ToInt32(this.hdnMonth.Value); salaryIPIModel.IssueYear = Convert.ToInt32(this.HdnYear.Value); if (this.sipi.UpdateIsIssuePay(salaryIPIModel) == 1) { this.JS.Text = "alert('工资发放成功!');"; this.GVIssuePayInfoDataBind(); this.frmPage.Attributes["src"] = string.Concat(new string[] { "SalaryIPIViewList.aspx?temid=", this.hdnTempID.Value, "&year=", this.HdnYear.Value, "&bm=", this.bmdm, "&m=", this.hdnMonth.Value }); return; } this.JS.Text = "alert('工资发放失败!');"; }
private void PageBind() { SalaryIPIModel model = this.sipi.GetModel(this.InstanceCode); this.LbDate.Text = model.IssueYear.ToString() + "年" + model.IssueMonth.ToString() + "月"; this.LbRemark.Text = model.Remark; this.DatatbESt(model.TempletID.Value); }
public int UpdateIsIssuePay(SalaryIPIModel model) { StringBuilder builder = new StringBuilder(); builder.Append("update HR_Salary_IssuePayInfo set "); builder.Append("IsIssuePay='" + model.IsIssuePay + "'"); builder.Append(string.Concat(new object[] { " where IssueYear=", model.IssueYear, " and IssueMonth=", model.IssueMonth, " and CorpCode='", model.CorpCode, "' " })); return(publicDbOpClass.ExecSqlString(builder.ToString())); }
public int Update(SalaryIPIModel model) { StringBuilder builder = new StringBuilder(); builder.Append("update HR_Salary_IssuePayInfo set "); builder.Append("RecordID='" + model.RecordID + "',"); builder.Append("AuditState=" + model.AuditState + ","); builder.Append("ClassCode='" + model.ClassCode + "',"); builder.Append("TempletID=" + model.TempletID + ","); builder.Append("IsIssuePay='" + model.IsIssuePay + "',"); builder.Append("UserCode='" + model.UserCode + "',"); builder.Append("RecordDate='" + model.RecordDate + "',"); builder.Append("Remark='" + model.Remark + "'"); builder.Append(string.Concat(new object[] { " where IssueYear=", model.IssueYear, " and IssueMonth=", model.IssueMonth, " and CorpCode='", model.CorpCode, "' " })); return(publicDbOpClass.ExecSqlString(builder.ToString())); }
public SalaryIPIModel GetModel(Guid RecordID) { StringBuilder builder = new StringBuilder(); builder.Append("select "); builder.Append(" RecordID,AuditState,IssueYear,IssueMonth,CorpCode,ClassCode,TempletID,IsIssuePay,UserCode,RecordDate,Remark "); builder.Append(" from HR_Salary_IssuePayInfo "); builder.Append(" where RecordID='" + RecordID + "' "); SalaryIPIModel model = new SalaryIPIModel(); 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]["IssueYear"].ToString() != "") { model.IssueYear = int.Parse(set.Tables[0].Rows[0]["IssueYear"].ToString()); } if (set.Tables[0].Rows[0]["IssueMonth"].ToString() != "") { model.IssueMonth = int.Parse(set.Tables[0].Rows[0]["IssueMonth"].ToString()); } model.CorpCode = set.Tables[0].Rows[0]["CorpCode"].ToString(); model.ClassCode = set.Tables[0].Rows[0]["ClassCode"].ToString(); if (set.Tables[0].Rows[0]["TempletID"].ToString() != "") { model.TempletID = new int?(int.Parse(set.Tables[0].Rows[0]["TempletID"].ToString())); } model.IsIssuePay = set.Tables[0].Rows[0]["IsIssuePay"].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.Remark = set.Tables[0].Rows[0]["Remark"].ToString(); return(model); }
public int Add(SalaryIPIModel model, string bmbm) { StringBuilder builder = new StringBuilder(); builder.Append("insert into HR_Salary_IssuePayInfo("); builder.Append("RecordID,AuditState,IssueYear,IssueMonth,CorpCode,ClassCode,TempletID,IsIssuePay,UserCode,RecordDate,Remark"); builder.Append(")"); builder.Append(" values ("); builder.Append("'" + model.RecordID + "',"); builder.Append(model.AuditState + ","); builder.Append(model.IssueYear + ","); builder.Append(model.IssueMonth + ","); builder.Append("'" + model.CorpCode + "',"); builder.Append("'" + model.ClassCode + "',"); builder.Append(model.TempletID + ","); builder.Append("'" + model.IsIssuePay + "',"); builder.Append("'" + model.UserCode + "',"); builder.Append("'" + model.RecordDate + "',"); builder.Append("'" + model.Remark + "'"); builder.Append(")"); builder.Append(string.Concat(new object[] { " exec P_HR_Salary_CreateWage ", model.TempletID, ",", model.IssueYear, ",", model.IssueMonth, ",'", bmbm, "','", model.RecordID, "'" })); return(publicDbOpClass.ExecSqlString(builder.ToString())); }