Ejemplo n.º 1
0
        public void SetSellerAddress(int ID)
        {
            SellerAddressBL sellerContactBL = new SellerAddressBL();

            table           = sellerContactBL.GetAddressById(ID);
            txtAddress.Text = table.Rows[0]["Address"].ToString();
            txtCity.Text    = table.Rows[0]["City"].ToString();
            txtPhone.Text   = table.Rows[0]["Phone"].ToString();
            txtStreet.Text  = table.Rows[0]["Street"].ToString();
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            SellerAddressBL contactBL = new SellerAddressBL();

            if (dgvSellerAddress.SelectedRows.Count > 0)
            {
                var id = (int)dgvSellerAddress.SelectedRows[0].Cells["SellerID"].Value;
                contactBL.DeleteSellerAddress(id);
                LoadSellerAddress();
            }
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            SellerAddressBL addressBL = new SellerAddressBL();

            if (table == null)
            {
                addressBL.AddSellerAddress(txtAddress.Text, txtCity.Text, txtPhone.Text, txtStreet.Text, SellerMasterID);
            }
            else
            {
                addressBL.UpdateSellerAddress(txtAddress.Text, txtCity.Text, txtPhone.Text, txtStreet.Text, (int)table.Rows[0]["SellerAddressID"]);
            }
            this.Close();
            LoadSellerAddress();
        }
Ejemplo n.º 4
0
        public void SetSellerMaster(int ID)
        {
            SellerMasterBL sellerMasterBL = new SellerMasterBL();

            table = sellerMasterBL.GetSellerByID(ID);
            txtCompanyName.Text = table.Rows[0]["CompanyName"].ToString();

            SellerContactBL seller = new SellerContactBL();

            dgvSellerContact.DataSource = seller.GetContactById((int)table.Rows[0]["ID"]);

            SellerAddressBL sellerAddress = new SellerAddressBL();

            dgvSellerAddress.DataSource = sellerAddress.GetAddressById((int)table.Rows[0]["ID"]);
        }
Ejemplo n.º 5
0
        private void LoadSellerAddress()
        {
            SellerAddressBL seller = new SellerAddressBL();

            dgvSellerAddress.DataSource = seller.GetSellerAddress();
        }