private bool CreateOutgo() { try { decimal quantity = _AvailableQuantity + 1; quantity = System.Xml.XmlConvert.ToDecimal(edtQuantity.Text); if (quantity > _AvailableQuantity || quantity <= 0) return false; DataAccess da = new DataAccess(); decimal Price = decimal.Parse(edtPrice.Text); decimal Discount = 0; Discount = System.Xml.XmlConvert.ToDecimal(edtDiscount.Text); decimal BasicPrice = CurrencyHelper.GetBasicPrice(CurrentCurrencyCode, Price); _SpareID = da.SpareInSpareOutgoCreate(_SpareInSpareIncomeID, quantity, _SpareOutgoID, Price, BasicPrice, Discount, 0); SpareContainer.Instance.Update(_SpareID); } catch (Exception) { return false; } return true; }