protected void cbBox_CheckedChanged(object sender, EventArgs e) { foreach (GridViewRow gridViewRow in this.gvBranch.Rows) { CheckBox checkBox = gridViewRow.FindControl("cbBox") as CheckBox; PtYhmc modelById = this.ptYhmcBll.GetModelById(checkBox.ToolTip); if (checkBox.Checked) { if (!this.hdUserList.Value.Contains(modelById.v_yhdm)) { HiddenField expr_71 = this.hdUserList; expr_71.Value = expr_71.Value + modelById.v_yhdm + ","; Label expr_92 = this.lblUserList; string text = expr_92.Text; expr_92.Text = string.Concat(new string[] { text, modelById.v_xm, "<span style=' cursor:pointer;' onclick=\"delUser('", modelById.v_yhdm, "','hdUserList','lblUserList')\">×</span>, " }); } } else { if (this.hdUserList.Value.Contains(modelById.v_yhdm)) { this.RemoveMsg(this.hdUserList, this.lblUserList, modelById.v_yhdm); } } } }
public void CommitEvent(object key) { fund_ReqinfoModle model = this.bll.GetModel(key.ToString()); fund_AccountOperateModle modle2 = new fund_AccountOperateModle { Acredence = Guid.NewGuid().ToString(), AccounType = model.reqType, AccountMony = new decimal?(Convert.ToDecimal(model.amount.ToString())), RealMony = new decimal?(Convert.ToDecimal(model.amount.ToString())) }; PtYhmc modelById = new PtYhmc(); modelById = new PtYhmcBll().GetModelById(base.UserCode); modle2.DepID = modelById.i_bmdm.ToString(); modle2.SumitMan = base.UserCode; modle2.SumiTime = new DateTime?(DateTime.Now); modle2.IsAccount = 0; if (model.IsContr == 0) { modle2.contracnum = model.PrjNum; modle2.projnum = ""; modle2.AccountNum = this.GetConBankNum(model.PrjNum); } else { modle2.projnum = model.PrjNum; modle2.contracnum = ""; modle2.AccountNum = this.GetPriBankNum(model.PrjNum); } modle2.AccountMan = string.Empty; modle2.AccountMark = model.remark.ToString(); new fund_AccountOperateBLL().Add(modle2); }
protected void btnModfAdd_Click(object sender, EventArgs e) { try { string text = this.Session["HumanCode"].ToString(); string[] array = text.Split(new char[] { '!', ':' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text2 = array2[i]; if (text2.Length == 8) { PtYhmc modelById = this.yhmc.GetModelById(text2); string yhdm = this.Page.Session["yhdm"].ToString(); string v_xm = modelById.v_xm; int i_bmdm = modelById.i_bmdm; string zw = ""; string address = modelById.Address; string postcode = modelById.Postcode; string bgdh = ""; string tel = modelById.Tel; string zdbs = "n"; string mobilePhoneCode = modelById.MobilePhoneCode; string sjbs = "n"; string cz = ""; string xb = "m"; if (modelById.Sex == "1") { xb = "m"; } else { if (modelById.Sex == "2") { xb = "f"; } } string dzyx = ""; string wlch = ""; string bz = ""; string xh = "0"; this.ald.cAddLinkman(yhdm, v_xm, i_bmdm, zw, address, postcode, bgdh, tel, zdbs, mobilePhoneCode, sjbs, cz, xb, dzyx, wlch, bz, xh); } } this.BindData(); } catch { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "message", "<script language='javascript' defer>alert('系统提示:\\n\\n添加失败!');</script>"); } }
protected void cbAllBox_CheckedChanged(object sender, EventArgs e) { CheckBox checkBox = this.gvBranch.HeaderRow.FindControl("cbAllBox") as CheckBox; if (checkBox.Checked) { IEnumerator enumerator = this.gvBranch.Rows.GetEnumerator(); try { while (enumerator.MoveNext()) { GridViewRow gridViewRow = (GridViewRow)enumerator.Current; CheckBox checkBox2 = gridViewRow.FindControl("cbBox") as CheckBox; PtYhmc modelById = this.ptYhmcBll.GetModelById(checkBox2.ToolTip); checkBox2.Checked = true; if (!this.hdUserList.Value.Contains(modelById.v_yhdm)) { HiddenField expr_92 = this.hdUserList; expr_92.Value = expr_92.Value + modelById.v_yhdm + ","; Label expr_B3 = this.lblUserList; string text = expr_B3.Text; expr_B3.Text = string.Concat(new string[] { text, modelById.v_xm, "<span style=' cursor:pointer;' onclick=\"delUser('", modelById.v_yhdm, "','hdUserList','lblUserList')\">×</span>, " }); } } return; } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } } foreach (GridViewRow gridViewRow2 in this.gvBranch.Rows) { CheckBox checkBox3 = gridViewRow2.FindControl("cbBox") as CheckBox; PtYhmc modelById2 = this.ptYhmcBll.GetModelById(checkBox3.ToolTip); checkBox3.Checked = false; if (this.hdUserList.Value.Contains(modelById2.v_yhdm)) { this.RemoveMsg(this.hdUserList, this.lblUserList, modelById2.v_yhdm); } } }
private void DataBindUserName(System.Collections.Generic.IList <string> userCodes) { System.Collections.Generic.List <PtYhmc> list = new System.Collections.Generic.List <PtYhmc>(); foreach (string current in userCodes) { PtYhmc modelById = this.yhmc.GetModelById(current); if (modelById != null) { list.Add(modelById); } } this.lblUserNames.DataSource = list; this.lblUserNames.DataBind(); }
public List <string> GetNames(IList <string> codes) { List <string> list = new List <string>(); foreach (string str in codes) { PtYhmc modelById = this.GetModelById(str); if (modelById != null) { list.Add(modelById.v_xm); } } return(list); }
private void DataBindUserName(List <string> userCodes) { List <PtYhmc> list = new List <PtYhmc>(); foreach (string current in userCodes) { PtYhmc modelById = this.yhmc.GetModelById(current); if (modelById != null) { list.Add(modelById); } } this.lbUser.DataSource = list; this.lbUser.DataBind(); }
private void InitContract(fund_AccountOperateModle contract) { if (!string.IsNullOrEmpty(this.contractID)) { contract.AoID = Convert.ToInt32(this.contractID); } contract.SumiTime = new DateTime?(Convert.ToDateTime(this.DateBox1.Text.Trim())); contract.SumitMan = base.UserCode; contract.AccountMony = new decimal?(Convert.ToDecimal(this.txtContractMoney.Value.Trim())); contract.RealMony = contract.AccountMony; contract.AccounType = new int?(int.Parse(this.DropDownList1.SelectedValue)); contract.Acredence = this.txtContractCode.Text.Trim(); contract.IsAccount = new int?(0); contract.projnum = this.hdfproject.Value.Trim(); contract.contracnum = this.hdfcontrcn.Value.Trim(); contract.AccountMan = string.Empty; contract.AccountNum = this.hdfaccount.Value.Trim(); contract.AccountMark = this.txtNotes.Text.Trim(); PtYhmc ptYhmc = new PtYhmc(); PtYhmcBll ptYhmcBll = new PtYhmcBll(); ptYhmc = ptYhmcBll.GetModelById(base.UserCode); contract.DepID = ptYhmc.i_bmdm.ToString(); }
public int Add(PtYhmc model) { return(this.ptYhmcService.Add(model)); }
public int Update(PtYhmc model) { return(this.ptYhmcService.Update(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>, " }); } } } }