Example #1
0
        private void EditAddress()
        {
            try
            {
                DataGridViewRow item = dataGridView5.SelectedRows[0];
                String strAddrName = item.Cells[0].Value.ToString(); ;
                String strAddrType = item.Cells[1].Value.ToString();

                Customer c1 = CustList.SearchCustomer(CustIDcombo.Text);
                BillShipList cBSList = new BillShipList(c1.ID);
                if (cBSList.BillShipExists(strAddrName, strAddrType))
                {
                    CustBillShip c2 = cBSList.SearchBillShip(strAddrName, strAddrType);
                    BillShipAddrForm f2 = new BillShipAddrForm(ref c2, "EDIT");
                    f2.ShowDialog();
                    LoadBillShip(c1.ID);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in Edit Address " + ex.Message);
            }
        }
Example #2
0
 //ADD NEW Shipping Address
 private void button68_Click(object sender, EventArgs e)
 {
     //Add A New Shipping or Billing Address
     //Saves Current Customer
     button27_Click(sender, e);
     //Creates a new BillShip calls the form2 to edit further
     Customer c1 = CustList.SearchCustomer(CustIDcombo.Text);
     CustBillShip cBS = new CustBillShip(c1.ID);
     //Add Address form
     BillShipAddrForm f = new BillShipAddrForm(ref cBS, "NEW");
     f.ShowDialog();
     LoadBillShip(c1.ID);
     //poplist();
 }