private void FrmEditOutbound_Load(object sender, EventArgs e) { cboCustomerNo.Properties.Items.Clear(); cboSales.Properties.Items.Clear(); MemoryTable.Instance.LoadSales(); cboSales.Properties.Items.AddRange(MemoryTable.Instance.SalesList); CustomerHelper ch = new CustomerHelper(); cboCustomerNo.Properties.Items.AddRange(ch.GetCustomerList()); outbound = GetOutBound(OutboundID); SetUI(); }
private void ComboBoxCustomer_TextChanged(object sender, EventArgs e) { CustomerHelper ch = new CustomerHelper(); string txt = cboCustomerNo.Text.Trim(); Customer obj = ch.GetCustomer(txt); if (obj != null) { cboSales.Text = obj.Sales; txtSellTo.Text = obj.Company; txtShipTo.Text = obj.ShipTo; txtAddr.Text = obj.Address; } else { cboSales.Text = ""; txtSellTo.Text = ""; txtShipTo.Text = ""; txtAddr.Text = ""; } }
private void btnRereshCustomer_Click(object sender, EventArgs e) { CustomerHelper ch = new CustomerHelper(); string txt = txtSellTo.Text.Trim(); TempCustomerList = ch.GetCustomerBySellTo(txt); if (TempCustomerList == null || TempCustomerList.Count == 0) { return; } Customer obj = TempCustomerList[0]; txtSellTo.Text = obj.Company; txtShipTo.Text = obj.ShipTo; txtAddr.Text = obj.Address; cboShipway.Text = obj.ShippingWay; nudTerm.Value = Convert.ToDecimal(obj.Term); txtFreight.Text = obj.Freight; nTempCutomerIndex = 0; SwitchCustomer(nTempCutomerIndex); }