Ejemplo n.º 1
0
        private void BindEditForm(object[] data)
        {
            supplierBAL = new BAL.SupplierBAL();
            DataTable table = new DataTable();

            table = supplierBAL.getSuppliers(data);
            BindFields(table);
        }
Ejemplo n.º 2
0
        private void BindSupplierGrid(object[] data)
        {
            supplierBAL = new BAL.SupplierBAL();
            DataTable table = new DataTable();

            table = supplierBAL.getSuppliers(data);
            dataGridSupplier.DataSource         = table;
            this.dataGridSupplier.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridSupplier_RowPostPaint);
            //dataGridUser.Columns[5].DefaultCellStyle.Format = "MM/dd/yyyy";
            //dataGridUser.Columns[6].DefaultCellStyle.Format = "MM/dd/yyyy";
            this.dataGridSupplier.Columns["SupplierId"].Visible = false;
            // Auto Resize
            dataGridSupplier.AutoResizeColumns();
            dataGridSupplier.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
        }
Ejemplo n.º 3
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            switch (OfModule)
            {
            case "User":
                BAL.UserBAL userBAL = new BAL.UserBAL();
                if (userBAL.deleteUser(ToDeleteId))
                {
                    MessageBox.Show("Deleted Successfully");
                    this.Close();
                }
                break;

            case "Customer":
                BAL.CustomerBAL customerBAL = new BAL.CustomerBAL();
                if (customerBAL.deleteCustomer(ToDeleteId))
                {
                    MessageBox.Show("Deleted Successfully");
                    this.Close();
                }
                break;

            case "Supplier":
                BAL.SupplierBAL supplierBAL = new BAL.SupplierBAL();
                if (supplierBAL.deleteSupplier(ToDeleteId))
                {
                    MessageBox.Show("Deleted Successfully");
                    this.Close();
                }
                break;

            case "Material":
                BAL.MaterialBAL materialBAL = new BAL.MaterialBAL();
                if (materialBAL.deleteMaterial(ToDeleteId))
                {
                    MessageBox.Show("Deleted Successfully");
                    this.Close();
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
 public EditSupplier(int SupplierId)
 {
     InitializeComponent();
     supplierBAL = new BAL.SupplierBAL();
     BindEditForm(new object[] { SupplierId, "" });
 }
Ejemplo n.º 5
0
 public AddSuppliers()
 {
     InitializeComponent();
     supplierBAL = new BAL.SupplierBAL();
 }