protected void btnSave_Click(object sender, System.EventArgs e) { string value = this.hfldPrjId.Value; if (!string.IsNullOrEmpty(value)) { System.Guid id = new System.Guid(value); PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService(); PTPrjInfoZTBDetailService pTPrjInfoZTBDetailService = new PTPrjInfoZTBDetailService(); PTPrjInfoZTB byId = pTPrjInfoZTBService.GetById(id); PTPrjInfoZTBDetail byId2 = pTPrjInfoZTBDetailService.GetById(value); TenderInfo.GetById(value); System.DateTime?successBidDate = null; if (!string.IsNullOrEmpty(this.txtSuccessBidDate.Text)) { successBidDate = new System.DateTime?(System.Convert.ToDateTime(this.txtSuccessBidDate.Text.Trim())); } byId2.SuccessBidDate = successBidDate; decimal?num = null; if (!string.IsNullOrEmpty(this.txtSuccessBidPrice.Text)) { num = new decimal?(System.Convert.ToDecimal(this.txtSuccessBidPrice.Text.Trim())); } byId2.SuccessBidPrice = num; byId2.SuccessBidRemark = this.txtSuccessBidRemark.Text.Trim(); byId.PrjCost = new double?(System.Convert.ToDouble(num)); byId.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now); byId.PrjState = new int?(int.Parse(ProjectParameter.WinBid)); byId.ParentTypeCode = pTPrjInfoZTBService.GetParentTypeCode(this.dropParentProject.SelectedValue); pTPrjInfoZTBService.Update(byId); pTPrjInfoZTBDetailService.Update(byId2); base.RegisterScript("top.ui.alert('中标资料保存成功!');top.ui.closeWin();top.ui.reloadTab();"); } }
protected void btnSave_Click(object sender, System.EventArgs e) { try { string value = this.hfldPrjId.Value; if (!string.IsNullOrEmpty(value)) { PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService(); PTPrjInfoZTBDetailService pTPrjInfoZTBDetailService = new PTPrjInfoZTBDetailService(); PTPrjInfoZTB byId = pTPrjInfoZTBService.GetById(new System.Guid(value)); PTPrjInfoZTBDetail byId2 = pTPrjInfoZTBDetailService.GetById(value); if (!string.IsNullOrEmpty(this.txtApplyDate.Text.Trim())) { byId2.ProjApplyDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyDate.Text.Trim())); } if (!string.IsNullOrEmpty(this.txtProjStartDate.Text.Trim())) { byId2.ProjStartDate = new System.DateTime?(System.Convert.ToDateTime(this.txtProjStartDate.Text.Trim())); } byId2.ProjStartRemark = this.txtStartRemark.Text.Trim(); byId.PrjState = new int?(System.Convert.ToInt32(ProjectParameter.Initiate)); byId.IsGiveUp = false; byId.OldState = null; byId.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now); pTPrjInfoZTBService.Update(byId); pTPrjInfoZTBDetailService.Update(byId2); base.RegisterScript("top.ui.show('报名通过资料保存成功!');top.ui.winSuccess({parentName:'_initiatePass'});"); } } catch { base.RegisterScript("top.ui.alert('报名通过资料保存失败!');top.ui.winSuccess({parentName:'_initiatePass'});"); } }
private string GetContractLimitsByContractTypeAndPrj(string contractTypeID, string prjId) { System.Collections.Generic.List <string> UserCodes = new System.Collections.Generic.List <string>(); System.Collections.Generic.List <string> ztbUsers = (System.Collections.Generic.List <string>) new PTPrjInfoZTBUserService().GetUser(prjId); System.Collections.Generic.List <string> userCodesByIDThroughPrjProperty = new PTPrjInfoZTBDetailService().getUserCodesByIDThroughPrjProperty(prjId); System.Collections.Generic.List <string> userCode2 = new PrivBusiDataRoleService().GetUserCode(prjId); ConContractType byID = new ConContractTypeService().GetByID(contractTypeID); System.Collections.Generic.List <string> ContractTypeUsers = JsonHelper.GetListFromJson(byID.UserCodes); userCodesByIDThroughPrjProperty.ForEach(delegate(string userCode) { if (!ztbUsers.Contains(userCode)) { ztbUsers.Add(userCode); } }); userCode2.ForEach(delegate(string userCode) { if (!ztbUsers.Contains(userCode)) { ztbUsers.Add(userCode); } }); if (ztbUsers.Count >= ContractTypeUsers.Count) { ContractTypeUsers.ForEach(delegate(string userCode) { if (ztbUsers.Contains(userCode)) { UserCodes.Add(userCode); } }); } else { ztbUsers.ForEach(delegate(string userCode) { if (ContractTypeUsers.Contains(userCode)) { UserCodes.Add(userCode); } }); } if (!UserCodes.Contains("00000000")) { UserCodes.Add("00000000"); } if (!UserCodes.Contains(base.UserCode)) { UserCodes.Add(base.UserCode); } return(JsonHelper.Serialize(UserCodes.ToArray())); }
private string GetContractLimits(string ContractTypeId) { System.Collections.Generic.List <string> userCodes = new System.Collections.Generic.List <string>(); userCodes.Add(base.UserCode); if (base.UserCode != "00000000") { userCodes.Add("00000000"); } ContractType contractType = new ContractType(); ContractTypeModel model = contractType.GetModel(ContractTypeId); if (model != null) { System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(model.UserCodes); listFromJson.ForEach(delegate(string userCode) { if (!userCodes.Contains(userCode)) { userCodes.Add(userCode); } }); } string text = this.hdnProjectCode.Value.Trim(); System.Collections.Generic.List <string> list = (System.Collections.Generic.List <string>) new PTPrjInfoZTBUserService().GetUser(text); list.ForEach(delegate(string userCode) { if (!userCodes.Contains(userCode)) { userCodes.Add(userCode); } }); System.Collections.Generic.List <string> userCodesByIDThroughPrjProperty = new PTPrjInfoZTBDetailService().getUserCodesByIDThroughPrjProperty(text); System.Collections.Generic.List <string> userCode2 = new PrivBusiDataRoleService().GetUserCode(text); userCodesByIDThroughPrjProperty.ForEach(delegate(string userCode) { if (!userCodes.Contains(userCode)) { userCodes.Add(userCode); } }); userCode2.ForEach(delegate(string userCode) { if (!userCodes.Contains(userCode)) { userCodes.Add(userCode); } }); return(JsonHelper.Serialize(userCodes.ToArray())); }
public static IList <string> GetBusiDataId(string type, string userCode) { List <string> list = new List <string>(); new PrivUserRoleService(); PrivBusiDataRoleService service = new PrivBusiDataRoleService(); if (type == "project") { string tableName = "PT_PrjInfo_ZTB_Detail"; IList <string> busiData = service.GetBusiData(userCode, tableName); IList <string> prjByUserCode = new PTPrjInfoZTBUserService().GetPrjByUserCode(userCode); string str2 = "XPM_Basic_CodeList"; IList <string> guidByPrjProperty = new PTPrjInfoZTBDetailService().GetGuidByPrjProperty(userCode, str2); busiData = busiData.Union <string>(guidByPrjProperty).Distinct <string>().ToList <string>(); busiData.Union <string>(prjByUserCode).Distinct <string>().ToList <string>(); list = busiData.Union <string>(prjByUserCode).Distinct <string>().ToList <string>(); } bool flag1 = type == "contractType"; return(list); }