Beispiel #1
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            if (Ref_Validation.TextValidation(txtEditProduct.Text) == true &&
                Ref_Validation.NumberValidation(txtEditUnitPrice.Text) == true &&
                Ref_Validation.NumberValidation(txtEditQuantity.Text) == true &&
                Ref_Validation.NumberValidation(txtEditCode.Text) == true
                )

            {
                ReF_Helper   = new Helper();
                ReF_Shopping = new shopping();
                Ref_ProductViewModel.Edit(Convert.ToInt32(lblEditID.Text)
                                          , txtEditProduct.Text, Convert.ToInt32(txtEditUnitPrice.Text),
                                          Convert.ToInt32(txtEditQuantity.Text),
                                          ReF_Helper.Price(txtEditUnitPrice.Text, txtEditQuantity.Text),
                                          Convert.ToInt32(txtEditCode.Text), ReF_Helper.ImageToByteArray(pctrBx.Image));
                MessageBox.Show("succeeded");
                this.Close();
                MessageBox.Show("please enter Refresh Button !!!");
            }
            else
            {
                MessageBox.Show("please check fields");
            }
        }
Beispiel #2
0
 private void ProductToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Ref_Shopping           = new shopping();
     Ref_Shopping.MdiParent = this;
     Ref_Shopping.Show();
 }