示例#1
0
 private void gvDimensions_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     try
     {
         if (gvDimensions.GetFocusedRowCellValue("DimensionID") != null)
         {
             if (ObjEArticle == null)
             {
                 ObjEArticle = new EArticles();
             }
             if (ObjDArticle == null)
             {
                 ObjDArticle = new DArticles();
             }
             int     IValue     = 0;
             decimal dMins      = 0;
             decimal dListPrice = 0;
             if (int.TryParse(Convert.ToString(gvDimensions.GetFocusedRowCellValue("DimensionID")), out IValue))
             {
                 ObjEArticle.DimensionID = IValue;
             }
             if (decimal.TryParse(Convert.ToString(gvDimensions.GetFocusedRowCellValue("Minuten")), out dMins))
             {
                 ObjEArticle.Minuten = dMins;
             }
             if (decimal.TryParse(Convert.ToString(gvDimensions.GetFocusedRowCellValue("ListPrice")), out dListPrice))
             {
                 ObjEArticle.ListPrice = dListPrice;
             }
             ObjDArticle.UpdateDimension(ObjEArticle);
             gvWI_FocusedRowChanged(null, null);
         }
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }