protected override void BindData() { if (Action == DatabaseAction.Edit) { ds_Product.SP_GetProduct.Clear(); ds_Product.SP_GetProduct.Merge(ProductionManager.GetProduct(ProductID)); if (ds_Product.SP_GetProduct.Count == 0) { throw new ArgumentException("მონაცემი არ მოიძებნა.", "RecordID"); } ProductID = ds_Product.SP_GetProduct[0].ProductID; MedicamentID = ds_Product.SP_GetProduct[0].MedicamentID; Quantity = ds_Product.SP_GetProduct[0].Quantity; ProductCurrencyCode = ds_Product.SP_GetProduct[0].ProductCurrencyCode; _StandardCost = ds_Product.SP_GetProduct[0].StandardCost; StandardCost = ds_Product.SP_GetProduct[0].StandardCost; _ListPrice = ds_Product.SP_GetProduct[0].ListPrice; ListPrice = ds_Product.SP_GetProduct[0].ListPrice; _DealerPrice = ds_Product.SP_GetProduct[0].DealerPrice; DealerPrice = ds_Product.SP_GetProduct[0].DealerPrice; DiscountPct = ds_Product.SP_GetProduct[0].DiscountPct; TaxRate = ds_Product.SP_GetProduct[0].TaxRate; dateValidDate.EditValue = ds_Product.SP_GetProduct[0][ds_Product.SP_GetProduct.ValidDateColumn]; CountryCode = ds_Product.SP_GetProduct[0].CountryCode; BrandID = ds_Product.SP_GetProduct[0].BrandID; Serie = ds_Product.SP_GetProduct[0].Serie; ModifiedUserID = ds_Product.SP_GetProduct[0].ModifiedUserID; ModifiedDate = ds_Product.SP_GetProduct[0].ModifiedDate; ds_Barcode.SP_GetBarcode.Clear(); ds_Barcode.SP_GetBarcode.Merge(ProductionManager.GetBarcode(string.Empty, ProductID)); } else { throw new Exception("პროდუქციაში მხოლოდ ცვლილებების შეტანაა ნებადართული."); } }