Пример #1
0
        public ActionResult EditCurrency(string CurrencyCode)
        {
            var currency = new NetStock.Contract.Currency();

            if (CurrencyCode != null && CurrencyCode.Length > 0)
            {
                currency = new NetStock.BusinessFactory.CurrencyBO().GetList().Where(dt => dt.CurrencyCode == CurrencyCode).FirstOrDefault();
            }

            return(PartialView("Currency", currency));
        }
Пример #2
0
        public ActionResult SaveCurrency(NetStock.Contract.Currency currencyItem)
        {
            try
            {
                if (currencyItem == null)
                {
                    return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest));
                }


                currencyItem.CurrencyCode = currencyItem.CurrencyCode;
                currencyItem.Description  = currencyItem.Description;
                currencyItem.Description1 = currencyItem.Description1;
                var result = new NetStock.BusinessFactory.CurrencyBO().SaveCurrency(currencyItem);
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("Error", ex.Message);
            }
            return(RedirectToAction("CurrencyList"));
        }