Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            String message = "";

            if (va.doValidation() == false)
            {
                return;
            }
            sch = db.tbl_Schedules.FirstOrDefault(x => x.id_schedule == tbIdschedule.Text);
            if (sch != null)
            {
                aksi("update");
                message = "Update";
            }

            else
            {
                aksi("insert");
                message = "Insert";
            }

            MessageBox.Show(message + " data success!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
            loadGrid();
            va.clear("tbIdschedule", 100);
        }
Esempio n. 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            String message = "";

            if (va.doValidation() == false)
            {
                return;
            }
            cust = db.tbl_Customers.FirstOrDefault(x => x.id_customer == int.Parse(tbIdcustomer.Text));
            if (cust != null)
            {
                aksi("update");
                message = "Update";
            }

            else
            {
                aksi("insert");
                message = "Insert";
            }

            MessageBox.Show(message + " data success", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
            va.clear("", 0);
            loadGrid();
        }
Esempio n. 3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (va.doValidation() == false)
     {
         return;
     }
     session.quantity  = int.Parse(tbQuantity.Text);
     this.DialogResult = DialogResult.OK;
 }