public ActionResult Index()
        {
            AuditLogModels viewerModels = null;

            try
            {
                MyClinic.Infrastructure.Log log = new MyClinic.Infrastructure.Log();
                var    objCurDate      = DateTime.Today;
                var    objPreDate      = objCurDate.AddDays(-1);
                string startDate       = Common.GetDatePickerDisplay(objPreDate);
                string endDate         = Common.GetDatePickerDisplay(objCurDate);
                string cboUser         = "";
                string cboPro          = "";
                var    orderBy         = Common.defaultOrderBy;
                var    order           = Common.defaultListOrder;
                var    totalRecords    = 0;
                var    lstProcessTypes = logRepository.GetProcessType();
                var    lstUsers        = userRepository.Get();
                var    lstRecords      = logRepository.Search(startDate, endDate, cboUser, cboPro, orderBy, order, out totalRecords);
                viewerModels = new AuditLogModels()
                {
                    lstRecords      = lstRecords,
                    lstUsers        = lstUsers,
                    lstProcessTypes = lstProcessTypes,
                    order           = order,
                    orderBy         = orderBy,
                    totalRecords    = totalRecords,
                    startDate       = startDate,
                    endDate         = endDate,
                    cboPro          = cboPro,
                    cboUser         = cboUser
                };
            }
            catch (Exception ex) {
                log.Error(ex);
            }
            return(View(viewerModels));
        }