Exemple #1
0
        private void BtnDeleteSupplier_Click(object sender, EventArgs e)
        {
            int SupplierId = Convert.ToInt32(gridSuppliers.CurrentRow.Cells["SupplierId"].Value);
            TravelWinRepository suppliers = new TravelWinRepository();

            suppliers.DeleteSupplier(SupplierId);
            gridSuppliers.DataSource = suppliers.GetSuppliers();
            callRefreshData();
        }
Exemple #2
0
        private void ProductManager_Load(object sender, EventArgs e)
        {
            gridSuppliers.AutoGenerateColumns = false;
            TravelWinRepository products = new TravelWinRepository();

            gridProducts.DataSource  = products.GetProduct();
            gridSuppliers.DataSource = products.GetSuppliers();
            RefreshCB();
        }
Exemple #3
0
        private void BtnSupplierAdd_Click(object sender, EventArgs e)
        {
            int    SupplierId = Convert.ToInt32(txtSupplierId.Text);
            string SupName    = txtNewSuppler.Text;
            //int ProductId = (int) cbProducts.SelectedItem;
            Product             prod      = cbProducts.SelectedItem as Product;
            TravelWinRepository suppliers = new TravelWinRepository();

            suppliers.InsertSupplier(SupplierId, SupName, prod.ProductId);
            gridSuppliers.DataSource = suppliers.GetSuppliers();
            callRefreshData();
        }