예제 #1
0
 public BatchAddInvoice(EMDataSet emDataSet,List<EMDataSet.POHeaderTblRow> notYetInvoicedRows)
 {
     m_emDataSet = emDataSet;
     InitializeComponent();
     foreach (EMDataSet.POHeaderTblRow row in
         notYetInvoicedRows)
     {
         TaggedItem tagged =
             new TaggedItem(row.POID,row.PONumber);
         poList.Items.Add(tagged);
     }
     System.DateTime dateTime = System.DateTime.Today;
     invoiceDateEdt.Text = HelperFunctions.ToDateText(dateTime);
 }
예제 #2
0
 void SetupLocationCombo(ComboBox box,int compID)
 {
     box.Items.Clear();
     box.Items.Add(new TaggedItem(-1,"All Locations"));
     box.SelectedIndex = 0;
     if (compID == -1)
         return;
     EMDataSet emDataSet = new EMDataSet();
     using (new TurnOffConstraints(emDataSet))
     {
         using (new OpenConnection(EM.IsWrite.No,AdapterHelper.Connection))
         {
             AdapterHelper.FillLocations(emDataSet,compID);
         }
         foreach (EMDataSet.LocationTblRow row in emDataSet.LocationTbl)
         {
             TaggedItem item = new TaggedItem(row.LocID,row.LocName);
             box.Items.Add(item);
         }
         emDataSet.Clear();
     }
 }
예제 #3
0
 void SetupCompanyCombo(ComboBox box,string constraint)
 {
     box.Items.Clear();
     box.Items.Add(new TaggedItem(-1,"All"));
     EMDataSet.CompanyTblDataTable companyTbl = new EMDataSet.CompanyTblDataTable();
     using (new OpenConnection(EM.IsWrite.No,AdapterHelper.Connection))
     {
         AdapterHelper.FillCompanyFromType(companyTbl,constraint);
         foreach (EMDataSet.CompanyTblRow row in companyTbl)
         {
             TaggedItem item = new TaggedItem(row.CompID,row.CompName);
             box.Items.Add(item);
         }
     }
     box.SelectedIndex = 0;
 }