public static string QueryCorp(Page obj, int corpID) { try { bool flag = true; Hashtable hashtable = new Hashtable(); if (obj.Cache["CORPLIST"] == null) { flag = false; } else { hashtable = (Hashtable)obj.Cache["CORPLIST"]; if (hashtable == null) { flag = false; } } if (!flag) { ContactCorpCollection corps = new ContactCorpAction().QueryAllCorpList(ValidState.All); int count = corps.Count; for (int i = 0; i < count; i++) { hashtable.Add(corps[i].CorpID.ToString(), corps[i].CorpName); } } obj.Cache["CORPLIST"] = hashtable; return(hashtable[corpID.ToString()].ToString()); } catch { return(""); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (base.Request.QueryString["Url"] != null && base.Request.QueryString["Url"].ToString() != "") { this.Url = base.Request.QueryString["Url"].ToString(); this.iframeMain.Attributes["src"] = this.Url; } if (base.Request.QueryString["Type"] != null && base.Request.QueryString["Type"].ToString() != "") { string a = base.Request.QueryString["Type"].ToString().Trim(); if (a == "Market") { this.lblDate.Text = "添加时间:"; this.lblPrice.Text = "项目估价:"; this.lblBidDept.Visible = false; this.tbBidDept.Visible = false; this.IMG1.Visible = false; this.lblBingoCorp.Visible = false; this.tbBingoCorp.Visible = false; this.ImgBingoCorp.Visible = false; } else { if (a == "InviteBid") { this.lblDate.Text = "招标时间:"; this.lblPrice.Text = "投标报价:"; this.lblStatus.Visible = false; this.ddlStatus.Visible = false; this.lblBingoCorp.Visible = false; this.tbBingoCorp.Visible = false; this.ImgBingoCorp.Visible = false; } else { if (a == "BingoBid") { this.lblDate.Text = "开标时间:"; this.lblPrice.Text = "中 标 价:"; this.lblBidDept.Visible = false; this.tbBidDept.Visible = false; this.IMG1.Visible = false; this.lblBidDept.Visible = false; this.tbBingoCorp.Visible = true; } } } } this.ddlCorp.DataSource = ContactCorpAction.getOwnerCorpList(); this.ddlCorp.DataTextField = "CorpName"; this.ddlCorp.DataValueField = "CorpID"; this.ddlCorp.DataBind(); com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.ddlPrjType, BasicType.ProjectType); com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.ddlInviteBidType, BasicType.InviteBidType); com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.ddlInviteBidMode, BasicType.InviteBidMode); com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.ddlAddress, BasicType.ProjectArea); } }
public static void RefreshCorp(Page obj) { Hashtable hashtable = new Hashtable(); ContactCorpCollection corps = new ContactCorpAction().QueryAllCorpList(ValidState.All); int count = corps.Count; for (int i = 0; i < count; i++) { hashtable.Add(corps[i].CorpID.ToString(), corps[i].CorpName); } obj.Cache["CORPLIST"] = hashtable; }