예제 #1
0
 private void updateDataGridView()
 {
     Cursor.Current = Cursors.WaitCursor;
     dgvPurchases.Rows.Clear();
     serviceDA = new DBControllerWSClient();
     purchases = new BindingList <purchase>(serviceDA.queryAllPurchase());
     for (int i = 0; i < purchases.Count; i++)
     {
         dgvPurchases.Rows.Add(new String[] {
             "" + purchases[i].serialCode, "" + purchases[i].totalPurchase, "" + purchases[i].supplier.name, "" + purchases[i].creationDate
         });
     }
     Cursor.Current = Cursors.Arrow;
 }
예제 #2
0
        private void PurchaseForm_Load(object sender, EventArgs e)
        {
            txtIdProv.Text      = "Ingrese ID Proovedor";
            txtIdProv.ForeColor = Color.Gray;
            serviceDA           = new View.MateWSLocal.DBControllerWSClient();
            employee emp = new employee();

            emp = serviceDA.queryEmployeeByUsername(currentUser.user1);
            userLabelContent.Text = emp.name + " " + emp.lastName + " " + emp.secondLastName;
            purchases             = new BindingList <purchase>(serviceDA.queryAllPurchase());
            String ultimoSerialCode = purchases[purchases.Count() - 1].serialCode;
            String nuevoSerialCode  = "C" + (int.Parse(ultimoSerialCode.Substring(1)) + 1).ToString("000000");

            txtSerialCode.Text = nuevoSerialCode;
        }