[HttpPost] [MenuAuthorize("82B5690B-BEA7-40EC-9643-E4E37431833B")] public ActionResult RoundOff(RoundoffSetting model) { try { var item = (from a in wallet.RoundoffSettings where a.CompanyId == CompanyId select a).FirstOrDefault(); if (item == null) { item = new RoundoffSetting(); item.CompanyId = CompanyId ?? 0; item.CreatedBy = User.Identity.Name; item.CreatedDate = DateTime.Now; wallet.RoundoffSettings.Add(item); } else { item.ModifiedBy = User.Identity.Name; item.ModifiedDate = DateTime.Now; } item.RoundingType = model.RoundingType; item.RoudingValue = model.RoudingValue; wallet.SaveChanges(); return Success(M("RoundOffSaveSucess")); } catch (Exception e) { log.Error("Failed to save RoundOff", e); return Error(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)