public int UpdatePTdbm(PTbdm model) { StringBuilder builder = new StringBuilder(); builder.Append("update PT_d_bm set "); builder.Append("i_sjdm=@i_sjdm,"); builder.Append("v_bmbm=@v_bmbm,"); builder.Append("CorpCode=@CorpCode,"); builder.Append("V_BMMC=@V_BMMC,"); builder.Append("v_bmqc=@v_bmqc,"); builder.Append("i_xh=@i_xh,"); builder.Append("v_bmjx=@v_bmjx,"); builder.Append("i_xjbm=@i_xjbm,"); builder.Append("i_jb=@i_jb,"); builder.Append("c_sfyx=@c_sfyx"); builder.Append(" where i_bmdm=@i_bmdm "); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@i_bmdm", SqlDbType.Int, 4), new SqlParameter("@i_sjdm", SqlDbType.Int, 4), new SqlParameter("@v_bmbm", SqlDbType.VarChar, 20), new SqlParameter("@CorpCode", SqlDbType.VarChar, 2), new SqlParameter("@V_BMMC", SqlDbType.VarChar, 100), new SqlParameter("@v_bmqc", SqlDbType.VarChar, 100), new SqlParameter("@i_xh", SqlDbType.Int, 4), new SqlParameter("@v_bmjx", SqlDbType.VarChar, 50), new SqlParameter("@i_xjbm", SqlDbType.Int, 4), new SqlParameter("@i_jb", SqlDbType.Int, 4), new SqlParameter("@c_sfyx", SqlDbType.Char, 1) }; commandParameters[0].Value = model.i_bmdm; commandParameters[1].Value = model.i_sjdm; commandParameters[2].Value = model.v_bmbm; commandParameters[3].Value = model.CorpCode; commandParameters[4].Value = model.V_BMMC; commandParameters[5].Value = model.v_bmqc; commandParameters[6].Value = model.i_xh; commandParameters[7].Value = model.v_bmjx; commandParameters[8].Value = model.i_xjbm; commandParameters[9].Value = model.i_jb; commandParameters[10].Value = model.c_sfyx; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public int AddPTbdm(PTbdm model) { StringBuilder builder = new StringBuilder(); builder.Append("insert into PT_d_bm("); builder.Append("i_bmdm,i_sjdm,v_bmbm,CorpCode,V_BMMC,v_bmqc,i_xh,v_bmjx,i_xjbm,i_jb,c_sfyx)"); builder.Append(" values ("); builder.Append("@i_bmdm,@i_sjdm,@v_bmbm,@CorpCode,@V_BMMC,@v_bmqc,@i_xh,@v_bmjx,@i_xjbm,@i_jb,@c_sfyx)"); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@i_bmdm", SqlDbType.Int, 4), new SqlParameter("@i_sjdm", SqlDbType.Int, 4), new SqlParameter("@v_bmbm", SqlDbType.VarChar, 20), new SqlParameter("@CorpCode", SqlDbType.VarChar, 2), new SqlParameter("@V_BMMC", SqlDbType.VarChar, 100), new SqlParameter("@v_bmqc", SqlDbType.VarChar, 100), new SqlParameter("@i_xh", SqlDbType.Int, 4), new SqlParameter("@v_bmjx", SqlDbType.VarChar, 50), new SqlParameter("@i_xjbm", SqlDbType.Int, 4), new SqlParameter("@i_jb", SqlDbType.Int, 4), new SqlParameter("@c_sfyx", SqlDbType.Char, 1) }; commandParameters[0].Value = model.i_bmdm; commandParameters[1].Value = model.i_sjdm; commandParameters[2].Value = model.v_bmbm; commandParameters[3].Value = model.CorpCode; commandParameters[4].Value = model.V_BMMC; commandParameters[5].Value = model.v_bmqc; commandParameters[6].Value = model.i_xh; commandParameters[7].Value = model.v_bmjx; commandParameters[8].Value = model.i_xjbm; commandParameters[9].Value = model.i_jb; commandParameters[10].Value = model.c_sfyx; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public int AddPTbdm(PTbdm model) { return(this.ptbdmService.AddPTbdm(model)); }
public int UpdatePTdbm(PTbdm model) { return(this.ptbdmService.UpdatePTdbm(model)); }
public void BindMsg() { this.lblUserList.Text = ""; this.lblBranchList.Text = ""; this.lblPostList.Text = ""; this.hdUserList.Value = ""; this.hdBranchList.Value = ""; this.hdPostList.Value = ""; this.hdBranchName.Value = ""; string str = (this.tvTreasury.SelectedValue == string.Empty) ? "0" : this.tvTreasury.SelectedValue; IList <TreasuryPermit> allTreasuryPermitByWhere = this.treasuryPermitBll.GetAllTreasuryPermitByWhere(" where tcode = '" + str + "' "); foreach (TreasuryPermit current in allTreasuryPermitByWhere) { if (current.ptype == SmEnum.PermitType.Person.ToString() && current.tcode == this.tvTreasury.SelectedValue) { PtYhmc modelById = this.ptYhmcBll.GetModelById(current.pcode); if (modelById != null && !this.hdUserList.Value.Contains(modelById.v_yhdm)) { HiddenField expr_137 = this.hdUserList; expr_137.Value = expr_137.Value + modelById.v_yhdm + ","; Label expr_158 = this.lblUserList; string text = expr_158.Text; expr_158.Text = string.Concat(new string[] { text, modelById.v_xm, "<span style=' cursor:pointer;' onclick=\"delUser('", modelById.v_yhdm, "','hdUserList','lblUserList')\">×</span>, " }); } } if (current.ptype == SmEnum.PermitType.Department.ToString() && current.tcode == this.tvTreasury.SelectedValue) { PTbdm pTbdmById = this.ptdbmBll.GetPTbdmById(Convert.ToInt32(current.pcode)); if (pTbdmById != null && !this.hdBranchList.Value.Contains(Convert.ToString(pTbdmById.i_bmdm))) { HiddenField expr_21C = this.hdBranchList; expr_21C.Value = expr_21C.Value + pTbdmById.i_bmdm + ","; Label expr_243 = this.lblBranchList; object text2 = expr_243.Text; expr_243.Text = string.Concat(new object[] { text2, pTbdmById.V_BMMC, "<span style=' cursor:pointer;' onclick=\"delUser('", pTbdmById.i_bmdm, "','hdBranchList','lblBranchList')\">×</span>, " }); HiddenField expr_298 = this.hdBranchName; object value = expr_298.Value; expr_298.Value = string.Concat(new object[] { value, pTbdmById.V_BMMC, "<span style=' cursor:pointer;' onclick=\"delUser('", pTbdmById.i_bmdm, "','hdBranchList','lblBranchList')\">×</span>, " }); } } if (current.ptype == SmEnum.PermitType.Post.ToString() && current.tcode == this.tvTreasury.SelectedValue) { Ptduty ptDutyById = this.ptdutyBll.GetPtDutyById(Convert.ToInt32(current.pcode)); if (!this.hdPostList.Value.Contains(Convert.ToString(ptDutyById.I_DUTYID))) { HiddenField expr_359 = this.hdPostList; expr_359.Value = expr_359.Value + ptDutyById.I_DUTYID + ","; Label expr_380 = this.lblPostList; object text3 = expr_380.Text; expr_380.Text = string.Concat(new object[] { text3, ptDutyById.DutyName, "<span style=' cursor:pointer;' onclick=\"delUser('", ptDutyById.I_DUTYID, "','hdPostList','lblPostList')\">×</span>, " }); } } } }