예제 #1
0
        private void BtnSearchEmployee_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            //dgvSupplier.Rows.Clear();
            serviceDAA     = new DBControllerWSClient();
            proveedor      = (serviceDAA.querySupplierByCode(txtRUC.Text));
            Cursor.Current = Cursors.Arrow;

            if (proveedor.name != null)
            {
                ModifySupplierForm modifySup = new ModifySupplierForm();
                modifySup.currentSupplier = new supplier();
                //supplier e1 = new supplier();
                serviceDAA = new DBControllerWSClient();
                //e1 = serviceDAA.querySupplierByCode(dgvSupplier.Rows[i].Cells[0].Value.ToString());
                modifySup.currentSupplier = proveedor;
                modifySup.SetParent(this);
                modifySup.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Proveedor no encontrado");
            }
            //dgvSupplier.Rows.Add(new String[] {
            //    proveedor.RUC, proveedor.name,proveedor.address,proveedor.bankData,proveedor.contactEmail,""+proveedor.contactPhone
            //    });
        }
예제 #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                serviceDAA     = new DBControllerWSClient();
                premises local = serviceDAA.queryPremisesByDescription(txtDesc.Text);

                if (local.address != null)
                {
                    Modificar_Local updateForm1 = new Modificar_Local();
                    updateForm1.currentLocal = new premises();


                    updateForm1.currentLocal = local;
                    updateForm1.SetParent(this);
                    updateForm1.ShowDialog();
                    updateDataGridView();
                }
                else
                {
                    MessageBox.Show("No existe un local con ese nombre");
                }
            }
            catch
            {
                MessageBox.Show("No existe el usuario");
                updateDataGridView();
            }
        }
예제 #3
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (!filledValues())
     {
         //MessageBox.Show("Complete la información");
     }
     else
     {
         Cursor.Current = Cursors.WaitCursor;
         // dgvFamilies.Rows.Clear();
         serviceDAA = new DBControllerWSClient();
         familia    = (serviceDAA.queryFamilyByCode(txtFamily.Text));
         if (familia.idFamily != null)
         {
             //     dgvFamilies.Rows.Add(new String[] {
             // familia.idFamily, familia.name, ""+familia.description
             // });
             UpdateFamilyForm updateFamily = new UpdateFamilyForm();
             updateFamily.currentFamily = new family();
             //family e1 = new family();
             //e1 = serviceDAA.queryFamilyByCode(dgvFamilies.Rows[i].Cells[0].Value.ToString());
             updateFamily.currentFamily = familia;
             updateFamily.SetParent(this);
             updateFamily.ShowDialog();
             updateDataGridView();
         }
         else
         {
             MessageBox.Show("Familia de Producto no Encontrada");
         }
         Cursor.Current = Cursors.Arrow;
     }
 }
예제 #4
0
 void updateDataGridView()
 {
     Cursor.Current = Cursors.WaitCursor;
     dgvSupplier.Rows.Clear();
     serviceDA = new DBControllerWSClient();
     suppliers = new BindingList <supplier>(serviceDA.queryAllSupplier());
     for (int i = 0; i < suppliers.Count; i++)
     {
         dgvSupplier.Rows.Add(new String[] {
             "" + suppliers[i].RUC, suppliers[i].name, suppliers[i].address, suppliers[i].bankData, "" + suppliers[i].contactEmail, "" + suppliers[i].contactPhone
         });
     }
     Cursor.Current = Cursors.Arrow;
 }
예제 #5
0
 void updateDataGridView()
 {
     Cursor.Current = Cursors.WaitCursor;
     dgvProducts.Rows.Clear();
     serviceDA    = new View.MateWSLocal.DBControllerWSClient();
     productsData = new BindingList <View.MateWSLocal.product>(serviceDA.queryAllProducts());
     for (int i = 0; i < productsData.Count; i++)
     {
         dgvProducts.Rows.Add(new String[] {
             "" + productsData[i].SKUcode, productsData[i].name, productsData[i].brand.name, productsData[i].family.name, "" + productsData[i].stock, "" + productsData[i].availability.ToString()
         });
     }
     Cursor.Current = Cursors.Arrow;
 }
예제 #6
0
 void updateDataGridView()
 {
     Cursor.Current = Cursors.WaitCursor;
     dgvLocal.Rows.Clear();
     serviceDA = new View.MateWSLocal.DBControllerWSClient();
     shopsData = new BindingList <View.MateWSLocal.premises>(serviceDA.queryAllPremises());
     for (int i = 0; i < shopsData.Count; i++)
     {
         dgvLocal.Rows.Add(new String[] {
             shopsData[i].id.ToString(), shopsData[i].description, shopsData[i].address
         });
     }
     Cursor.Current = Cursors.Arrow;
 }
예제 #7
0
 void updateDataGridView()
 {
     Cursor.Current = Cursors.WaitCursor;
     dgvFamilies.Rows.Clear();
     serviceDA = new View.MateWSLocal.DBControllerWSClient();
     families  = new BindingList <View.MateWSLocal.family>(serviceDA.queryAllFamily());
     for (int i = 0; i < families.Count; i++)
     {
         dgvFamilies.Rows.Add(new String[] {
             "" + families[i].idFamily, families[i].name, families[i].description
         });
     }
     Cursor.Current = Cursors.Arrow;
 }
예제 #8
0
        private void btnModLocal_Click(object sender, EventArgs e)
        {
            int i = dgvLocal.CurrentCell.RowIndex;

            if (i >= 0)
            {
                Modificar_Local modLocal = new Modificar_Local();
                modLocal.currentLocal = new premises();
                premises l1 = new premises();
                serviceDAA            = new View.MateWSLocal.DBControllerWSClient();
                l1                    = serviceDAA.queryPremisesByDescription(dgvLocal.Rows[i].Cells[1].Value.ToString());
                modLocal.currentLocal = l1;
                modLocal.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Seleccione un local");
            }
        }
예제 #9
0
        private void btnUpdateFamily_Click(object sender, EventArgs e)
        {
            int i = dgvFamilies.CurrentCell.RowIndex;

            if (i >= 0)
            {
                UpdateFamilyForm updateFamily = new UpdateFamilyForm();
                updateFamily.currentFamily = new family();
                family e1 = new family();
                serviceDAA = new DBControllerWSClient();
                e1         = serviceDAA.queryFamilyByCode(dgvFamilies.Rows[i].Cells[0].Value.ToString());
                updateFamily.currentFamily = e1;
                updateFamily.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Seleccione una familia");
            }
        }
예제 #10
0
        private void BtnModifyEmployee_Click(object sender, EventArgs e)
        {
            int i = dgvSupplier.CurrentCell.RowIndex;

            if (i >= 0)
            {
                ModifySupplierForm modifySup = new ModifySupplierForm();
                modifySup.currentSupplier = new supplier();
                supplier e1 = new supplier();
                serviceDAA = new DBControllerWSClient();
                e1         = serviceDAA.querySupplierByCode(dgvSupplier.Rows[i].Cells[0].Value.ToString());
                modifySup.currentSupplier = e1;
                modifySup.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Seleccione un proveedor");
            }

            /*
             * ModifySupplierForm modifySupForm = new ModifySupplierForm();
             * modifySupForm.ShowDialog();*/
        }