示例#1
0
 /// <summary>
 /// vouchertype conbofill function
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         SuffixPrefixSP spSuffixPrefix = new SuffixPrefixSP();
         DataTable      dtbl           = new DataTable();
         dtbl = spSuffixPrefix.VoucherTypeViewAllInSuffixPrefix();
         cmbVoucherType.DataSource    = dtbl;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SPS1" + ex.Message;
     }
 }
示例#2
0
 /// <summary>
 /// voucherType combofill for search function
 /// </summary>
 public void VoucherTypeComboFillSearch()
 {
     try
     {
         SuffixPrefixSP spSuffixPrefix = new SuffixPrefixSP();
         DataTable      dtbl           = new DataTable();
         dtbl = spSuffixPrefix.VoucherTypeViewAllInSuffixPrefix();
         DataRow dr = dtbl.NewRow();
         dr[0] = 0;
         dr[1] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbVoucherTypeSearch.DataSource    = dtbl;
         cmbVoucherTypeSearch.ValueMember   = "voucherTypeId";
         cmbVoucherTypeSearch.DisplayMember = "voucherTypeName";
         cmbVoucherTypeSearch.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SPS2" + ex.Message;
     }
 }