Exemplo n.º 1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (ListView1.Items.Count == 0)
     {
         Interaction.MsgBox("Please select record to update", MsgBoxStyle.Exclamation, "Update");
         return;
     }
     try
     {
         if (string.IsNullOrEmpty(ListView1.FocusedItem.Text))
         {
         }
         else
         {
             SQLConn.adding   = false;
             SQLConn.updating = true;
             productID        = Convert.ToInt32(ListView1.FocusedItem.Text);
             frmAddEditProduct aeP = new frmAddEditProduct(productID);
             aeP.ShowDialog();
         }
     }
     catch
     {
         Interaction.MsgBox("Please select record to update", MsgBoxStyle.Exclamation, "Update");
         return;
     }
 }
Exemplo n.º 2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            SQLConn.adding   = true;
            SQLConn.updating = false;
            int init = 0;
            frmAddEditProduct aeP = new frmAddEditProduct(init);

            aeP.ShowDialog();
        }
Exemplo n.º 3
0
        public frmSelectCategory(Form callingForm, bool isQuickAdd)
        {
            InitializeComponent();

            if (isQuickAdd != true)
            {
                frmProduct = callingForm as frmAddEditProduct;
            }
            else
            {
                frmProductQuick = callingForm as frmAddProductQuick;
            }


            IsQuickAdd = isQuickAdd;
        }
Exemplo n.º 4
0
 public frmSelectCategory(Form callingForm)
 {
     InitializeComponent();
     frmProduct = callingForm as frmAddEditProduct;
 }