Hashtable .net

來源:互聯網
上載者:User

標籤:

雖然暫時不知道Hashtable的效能如何,但是在定義包含入參較多的方法時還是很實用的。DataSet ds = DA.ExportData(this.getQuerConfition(), RoleSec, EMP_ID); /// /// 獲取查詢條件 /// /// private Hashtable getQuerConfition() { Hashtable arr = new Hashtable(); arr.Add("FormType",this.ddlFormType.SelectedValue);//0 表單類別 arr.Add("BFormID",this.tbBFormNo.Text.Trim());//1請款單號從 arr.Add("EFormID",this.tbEFormNo.Text.Trim());//2請款單號到 arr.Add("BBU",this.tbBBU.Text.Trim());//3公司別從 arr.Add("EBU",this.tbEBU.Text.Trim());//4公司別到 arr.Add("BStore",this.tbBStore.Text.Trim());//5店別從 arr.Add("EStore",this.tbEStore.Text.Trim());//6店別到 arr.Add("BDept", this.tbBDept.Text.Trim()); //店別從 arr.Add("EDept",this.tbEDept.Text.Trim()); //店別到 arr.Add("BApplyDate", this.tbBApplyDate.SelectedDate.ToString("yyyy-MM-dd"));//7申請日期從 arr.Add("EApplyDate", this.tbEApplyDate.SelectedDate.ToString("yyyy-MM-dd"));//8申請日期到 arr.Add("BSubject",this.tbBSubject.Text.Trim());//9會計科目從 arr.Add("ESubject",this.tbESubject.Text.Trim()); string value = ""; for (int i = 0; i < cbYorN.Items.Count; i++) { if (cbYorN.Items[i].Selected == true) { value += cbYorN.Items[i].Value + "|"; } } arr.Add("YorN",value.TrimEnd(‘|‘)); return arr; } public DataSet ExportData(Hashtable hs, string RoleSec, string empid) { //表單單號 if (hs["BFormID"].ToString() != string.Empty) { sql1 += " AND main.FORM_ID>=‘" + hs["BFormID"].ToString() + "‘"; } } Hashtable hsFORM_NO = new Hashtable(); object[] arr = new object[2]; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { form_no = Convert.ToInt32(ds.Tables[0].Rows[i]["FORM_NO"]); if (!hsFORM_NO.ContainsValue(form_no)) { hsFORM_NO.Add(i, form_no); arr = new object[2];//釋放資源

Hashtable .net

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.