Beispiel #1
0
 private void all_ProductSaved(object sender, SelectedProductChangedArgs e)
 {
     combo_category_name.Text         = e.CategoryName;
     combo_product_name.SelectedValue = e.ProductName;
     text_quantity.Text = e.Amount;
     btn_save.PerformClick();
 }
Beispiel #2
0
        protected void OnProductSaved(SelectedProductChangedArgs args)
        {
            EventHandler <SelectedProductChangedArgs> handler = ProductSaved;

            if (handler != null)
            {
                ProductSaved(this, args);
            }
        }
Beispiel #3
0
        public void OnProductSelected(SelectedProductChangedArgs e)
        {
            EventHandler <SelectedProductChangedArgs> handler = SelectedProductChanged;

            if (handler != null)
            {
                SelectedProductChanged(this, e);
            }
        }
Beispiel #4
0
        private void btn_save_Click(object sender, EventArgs e)
        {
            SelectedProductChangedArgs selected_product = new SelectedProductChangedArgs()
            {
                ProductName  = dgv_all_products.CurrentRow.Cells["product_id"].Value.ToString(),
                CategoryName = dgv_all_products.CurrentRow.Cells["clmn_category_name"].Value.ToString(),
                Amount       = text_amount.Text
            };

            OnProductSaved(selected_product);
        }
Beispiel #5
0
 private void SelectProduct(int row_index)
 {
     if (row_index >= 0)
     {
         SelectedProductChangedArgs selected_product_name = new SelectedProductChangedArgs()
         {
             ProductName  = dgv_all_products.Rows[row_index].Cells["product_id"].Value.ToString(),
             CategoryName = dgv_all_products.Rows[row_index].Cells["clmn_category_name"].Value.ToString()
         };
         OnProductSelected(selected_product_name);
     }
 }
Beispiel #6
0
 private void all_SelectedProductChanged(object sender, SelectedProductChangedArgs e)
 {
     combo_category_name.Text         = e.CategoryName;
     combo_product_name.SelectedValue = e.ProductName;
 }