protected void cbBox_CheckedChanged2(object sender, EventArgs e) { foreach (GridViewRow gridViewRow in this.gvPost.Rows) { CheckBox checkBox = gridViewRow.FindControl("cbPost") as CheckBox; Ptduty ptDutyById = this.ptdutyBll.GetPtDutyById(Convert.ToInt32(checkBox.ToolTip)); if (checkBox.Checked) { if (!this.hdPostList.Value.Contains(Convert.ToString(ptDutyById.I_DUTYID))) { HiddenField expr_7B = this.hdPostList; expr_7B.Value = expr_7B.Value + ptDutyById.I_DUTYID + ","; Label expr_A1 = this.lblPostList; object text = expr_A1.Text; expr_A1.Text = string.Concat(new object[] { text, ptDutyById.DutyName, "<span style=' cursor:pointer;' onclick=\"delUser('", ptDutyById.I_DUTYID, "','hdPostList','lblPostList')\">×</span>, " }); } } else { if (this.hdPostList.Value.Contains(Convert.ToString(ptDutyById.I_DUTYID))) { this.RemoveMsg(this.hdPostList, this.lblPostList, ptDutyById.I_DUTYID.ToString()); } } } }
protected void cbAllBoxPost_CheckedChanged(object sender, EventArgs e) { CheckBox checkBox = this.gvPost.HeaderRow.FindControl("cbAllBoxPost") as CheckBox; if (checkBox.Checked) { IEnumerator enumerator = this.gvPost.Rows.GetEnumerator(); try { while (enumerator.MoveNext()) { GridViewRow gridViewRow = (GridViewRow)enumerator.Current; CheckBox checkBox2 = gridViewRow.FindControl("cbPost") as CheckBox; Ptduty ptDutyById = this.ptdutyBll.GetPtDutyById(Convert.ToInt32(checkBox2.ToolTip)); checkBox2.Checked = true; if (!this.hdPostList.Value.Contains(Convert.ToString(ptDutyById.I_DUTYID))) { HiddenField expr_9C = this.hdPostList; expr_9C.Value = expr_9C.Value + ptDutyById.I_DUTYID + ","; Label expr_C2 = this.lblPostList; object text = expr_C2.Text; expr_C2.Text = string.Concat(new object[] { text, ptDutyById.DutyName, "<span style=' cursor:pointer;' onclick=\"delUser('", ptDutyById.I_DUTYID, "','hdPostList','lblPostList')\">×</span>, " }); } } return; } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } } foreach (GridViewRow gridViewRow2 in this.gvPost.Rows) { CheckBox checkBox3 = gridViewRow2.FindControl("cbPost") as CheckBox; Ptduty ptDutyById2 = this.ptdutyBll.GetPtDutyById(Convert.ToInt32(checkBox3.ToolTip)); checkBox3.Checked = false; if (this.hdPostList.Value.Contains(Convert.ToString(ptDutyById2.I_DUTYID))) { this.RemoveMsg(this.hdPostList, this.lblPostList, ptDutyById2.I_DUTYID.ToString()); } } }
public int AddPtduty(Ptduty model) { StringBuilder builder = new StringBuilder(); builder.Append("insert into PT_DUTY("); builder.Append("i_bmdm,DutyCode,c_sfyx,RoleTypeCode,DutyNumber,Remark)"); builder.Append(" values ("); builder.Append("@i_bmdm,@DutyCode,@c_sfyx,@RoleTypeCode,@DutyNumber,@Remark)"); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@i_bmdm", SqlDbType.Int, 4), new SqlParameter("@DutyCode", SqlDbType.VarChar, 9), new SqlParameter("@c_sfyx", SqlDbType.Char, 1), new SqlParameter("@RoleTypeCode", SqlDbType.VarChar, 3), new SqlParameter("@DutyNumber", SqlDbType.Int, 4), new SqlParameter("@Remark", SqlDbType.VarChar, 0x3e8) }; commandParameters[0].Value = model.i_bmdm; commandParameters[1].Value = model.DutyCode; commandParameters[2].Value = model.c_sfyx; commandParameters[3].Value = model.RoleTypeCode; commandParameters[4].Value = model.DutyNumber; commandParameters[5].Value = model.Remark; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public int Update(Ptduty model) { StringBuilder builder = new StringBuilder(); builder.Append("update PT_DUTY set "); builder.Append("i_bmdm=@i_bmdm,"); builder.Append("DutyCode=@DutyCode,"); builder.Append("c_sfyx=@c_sfyx,"); builder.Append("RoleTypeCode=@RoleTypeCode,"); builder.Append("DutyNumber=@DutyNumber,"); builder.Append("Remark=@Remark"); builder.Append(" where I_DUTYID=@I_DUTYID "); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@I_DUTYID", SqlDbType.Int, 4), new SqlParameter("@i_bmdm", SqlDbType.Int, 4), new SqlParameter("@DutyCode", SqlDbType.VarChar, 9), new SqlParameter("@c_sfyx", SqlDbType.Char, 1), new SqlParameter("@RoleTypeCode", SqlDbType.VarChar, 3), new SqlParameter("@DutyNumber", SqlDbType.Int, 4), new SqlParameter("@Remark", SqlDbType.VarChar, 0x3e8) }; commandParameters[0].Value = model.I_DUTYID; commandParameters[1].Value = model.i_bmdm; commandParameters[2].Value = model.DutyCode; commandParameters[3].Value = model.c_sfyx; commandParameters[4].Value = model.RoleTypeCode; commandParameters[5].Value = model.DutyNumber; commandParameters[6].Value = model.Remark; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public int Update(Ptduty model) { return(this.ptdutyService.Update(model)); }
public int AddPtduty(Ptduty model) { return(this.ptdutyService.AddPtduty(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>, " }); } } } }