Exemple #1
0
 private void ItemsRadGridView_CellClick(object sender, GridViewCellEventArgs e)
 {
     if (e.RowIndex == -1)
     {
         return;
     }
     if (this._seachForm == SearchEnum.SEARCH_CUSTOMER)
     {
         int valor = (Int32)ItemsRadGridView.Rows[e.RowIndex].Cells["CustomerID"].Value;
         foreach (var item in listOfCustomer)
         {
             if (item.CustomerID == valor)
             {
                 _currentCustomer = item;
                 break;
             }
         }
     }
     else if (this._seachForm == SearchEnum.SEARCH_PRODUCT)
     {
         int valor = (Int32)ItemsRadGridView.Rows[e.RowIndex].Cells["ProductID"].Value;
         foreach (var item in listOfProduct)
         {
             if (item.ProductID == valor)
             {
                 _currentProduct = item;
                 break;
             }
         }
     }
     //this.ItemsRadGridView.Rows[e.RowIndex].Cells["ProductID"].Value;
 }
Exemple #2
0
 private void SearchProductComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (SearchProductComboBox.SelectedValue != null)
     {
         CurrentProductToSelected = (from c in listOfProducts
                                     where c.ProductID == Convert.ToInt32(SearchProductComboBox.SelectedValue)
                                     select c).FirstOrDefault();
         UnitPriceRadMaskedEditBox.Text = CurrentProductToSelected.UnitPrice1.ToString();
         AmountMaskedEditBox.Focus();
     }
     else
     {
         SearchProductComboBox.Focus();
         return;
     }
 }