public String GetSettings(Int32 id, Common.Settings type) { menuzRusDataContext db = new menuzRusDataContext(base.connectionString); return db.Settings.Where(m => m.CustomerId == id && m.Type == type.ToString()).Select(m => m.Value).FirstOrDefault(); }
public JsonResult UpdateCheckStatus(Int32 checkId, Common.CheckType type, Common.CheckStatus status, Decimal adjustment, Int32 split) { CheckPrint model; try { if (status == Common.CheckStatus.Paid) { model = GetCheckPrintModel(checkId, type.ToString(), status.ToString(), split, adjustment); if (model != null) _orderService.UpdateCheckStatusPaid(checkId, model.Summary, model.Tax, model.Adjustment); } else { _orderService.UpdateCheckStatus(checkId, status); } } catch (Exception ex) { base.Log(ex); } finally { } var retVal = new { }; return Json(retVal); }
private Boolean SaveSetting(Common.Settings type, String value) { Setting setting; try { setting = new Setting(); setting.Type = type.ToString(); setting.Value = value; if (!_settingsService.SaveSetting(setting, SessionData.customer.id)) { base.Log(SessionData.exception); return false; } } catch (Exception ex) { base.Log(ex); return false; } finally { } return true; }
private void LogData(Common.LogType logType) { try { _LogService.Log(logType, SessionData.user.id, SessionData.sessionId, EnumHelper<Common.LogType>.Parse(logType.ToString()).ToString()); } catch (Exception ex) { throw ex; } }