/// <summary> /// Log any executed command by user /// </summary> /// <param name="module"></param> /// <param name="status"></param> /// <param name="command"></param> /// <param name="account"></param> /// <param name="newValue"></param> /// <param name="oldValue"></param> public static void CommandLog(bool status, ClinicEnums.Module module, string command, AccountModel account, object newValue = null, object oldValue = null) { try { var log = new LogModel { Start = DateTime.Now, Module = module.ToString(), Status = status ? "SUCCESS" : "ERROR", Command = command, UserName = account.UserName, Organization = account.Organization, OldValue = oldValue is null ? null : JsonConvert.SerializeObject(oldValue), NewValue = newValue is null ? null : JsonConvert.SerializeObject(newValue), CreatedBy = account.UserCode, CreatedDate = DateTime.Now }; var _entity = Mapper.Map <LogModel, Log>(log); using (var context = new klinikEntities()) { context.Logs.Add(_entity); context.SaveChanges(); } } catch (Exception ex) { using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry(ex.GetAllMessages(), EventLogEntryType.Error, 101, 1); } } }
public MasterDataController(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// public EmployeeHandler(IUnitOfWork unitOfWork, klinikEntities context = null) { _unitOfWork = unitOfWork; _context = context; }
public EmployeeValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
public LabController(IUnitOfWork unitOfWork, klinikEntities context, ClinicHandler clinicHandler) { _unitOfWork = unitOfWork; _context = context; _clinicHandler = clinicHandler; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public UserRoleHandler(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public BaseController(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public AccountHandler(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public PasswordHistoryValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
public DoctorValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
public AdministrationController(IUnitOfWork unitOfWork, klinikEntities context) : base(unitOfWork, context) { }
/// <summary> /// Contructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public UserRoleValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="privilege_name"></param> public CustomAuthorizeAttribute(params string[] privilege_name) { this._privilege_names = privilege_name; _context = new klinikEntities(); }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public RolePrivilegeHandler(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
public PasswordHistoryController(IUnitOfWork unitOfWork, klinikEntities context) { _context = context; _unitOfWork = unitOfWork; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> public DoctorHandler(IUnitOfWork unitOfWork, klinikEntities context = null) { _unitOfWork = unitOfWork; _context = context; }
public UnitOfWork(klinikEntities context) { _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public OrganizationPrivilegeValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="unitOfWork"></param> /// <param name="context"></param> public RolePrivilegeValidator(IUnitOfWork unitOfWork, klinikEntities context) { _unitOfWork = unitOfWork; _context = context; }