Esempio n. 1
0
 private void GetSoItems()
 {
     this.soItemsStateList.Clear();
     foreach (SoItems item in SoMgr.GetSoItemsAccordingToSoId(this.soId))
     {
         this.soItemsStateList.Add(
             new SoItemsContentAndState
         {
             soitem = item,
             state  = OrderItemsState.Normal
         }
             );
     }
 }
Esempio n. 2
0
        public void FillTheTable(So so)
        {
            this.soId         = so.soId;
            tbCustomer.Text   = so.customerName;
            tbContact.Text    = so.contact;
            tbSalesOrder.Text = so.salesOrderNo;
            if (so.approverId != null)
            {
                tbApprover.Text = new AmbleClient.Admin.AccountMgr.AccountMgr().GetNameById(so.approverId.Value);
            }
            if (so.approveDate != null)
            {
                tbApproveDate.Text = so.approveDate.Value.ToShortDateString();
            }
            dateTimePicker1.Value      = so.orderDate;
            tbCustomerPo.Text          = so.customerPo;
            tbPaymentTerm.Text         = so.paymentTerm;
            tbFreightTerm.Text         = so.freightTerm;
            tbCustomerAccount.Text     = so.customerAccount;
            tbSpecialInstructions.Text = so.specialInstructions;
            tbBillto.Text = so.billTo;
            tbShipTo.Text = so.shipTo;
            //Fill the sales ID
            FillTheSalesComboBox();

            cbSp.SelectedIndex = mySubs.IndexOf(so.salesId);



            foreach (SoItems item in SoMgr.GetSoItemsAccordingToSoId(so.soId))
            {
                this.soItemsStateList.Add(
                    new SoItemsContentAndState
                {
                    soitem = item,
                    state  = OrderItemsState.Normal
                }
                    );
            }
            ShowDataInDataGridView();
        }