Ejemplo n.º 1
0
 private void button_Inventory_Click(object sender, EventArgs e)
 {
     update.BrandName      = BrandNametxt.Text;
     update.GenericName    = GenericNametxt.Text;
     update.ExpiryDate     = Convert.ToDateTime(ExpiryDatetxt.Text);
     update.DateArrived    = Convert.ToDateTime(DateArrivedtxt.Text);
     update.PurchasedPrice = Convert.ToDouble(PurchasedPricetxt.Text);
     update.SellingPrice   = Convert.ToDouble(SellingPricetxt.Text);
     update.BatchNumber    = BatchNumbertxt.Text;
     update.Storage        = Storagetxt.Text;
     update.Quantity       = Convert.ToInt32(Quantitytxt.Text);
     update.Formulation    = formulationtxt.Text;
     Ida.updateItem(update);
 }
Ejemplo n.º 2
0
 private void button_Inventory_Click(object sender, EventArgs e)
 {
     if (check())
     {
         update.BrandName   = BrandNametxt.Text;
         update.GenericName = GenericNametxt.Text;
         //  update.ExpiryDate = Convert.ToDateTime(ExpiryDatetxt.Text);
         //  update.DateArrived = Convert.ToDateTime(DateArrivedtxt.Text);
         update.DateArrived    = dateTimePicker2.Value;
         update.ExpiryDate     = dateTimePicker1.Value;
         update.PurchasedPrice = Convert.ToDouble(PurchasedPricetxt.Text);
         update.SellingPrice   = Convert.ToDouble(SellingPricetxt.Text);
         update.BatchNumber    = BatchNumbertxt.Text;
         update.Storage        = Storagetxt.Text;
         update.Quantity       = Convert.ToInt32(Quantitytxt.Text);
         update.Formulation    = formulationtxt.Text;
         if (checkBox_IsVatable.Checked == true)
         {
             update.Vatable = 1;
         }
         else
         {
             update.Vatable = 0;
         }
         update.Threshhold = Convert.ToInt32(threshholdTxt.Text);
         if (Ida.updateItem(update))
         {
             Refresh();
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("Error: Please fill in all required fields");
     }
 }