예제 #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 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();*/
        }
예제 #3
0
        private void BtnModifyEmployee_Click(object sender, EventArgs e)
        {
            ModifySupplierForm modifySupForm = new ModifySupplierForm();

            modifySupForm.ShowDialog();
        }