Ejemplo n.º 1
0
        public ActionResult Evaluationlst()
        {
            DashboardModel model = new DashboardModel();

            _loginRepo = new LoginRepo();
            //string _dept = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();

            List <SelectListItem> deptFilter = new List <SelectListItem>();

            //int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            //if (_empSOMRole == (int)SOMEmpRole.TQCHead)
            //{
            //    deptFilter = _loginRepo.GetDepartmentDetails();
            //}
            //else
            //{
            //    deptFilter = _loginRepo.GetDepartmentDetails(_dept, "");
            //}
            deptFilter          = _loginRepo.GetDepartmentDetails();
            model.DeptFilterlst = deptFilter;

            model.From_Date = DateTime.Now.ToString("MMMM yyyy");
            model.To_Date   = DateTime.Now.ToString("MMMM yyyy");
            return(View(model));
        }
 public OrderController(ILoginRepo loginRepo, IOrderRepo orderRepo, ICartRepo cartRepo, IProductRepo productRepo)
 {
     _orderRepo   = orderRepo;
     _loginRepo   = loginRepo;
     _cartRepo    = cartRepo;
     _productRepo = productRepo;
 }
Ejemplo n.º 3
0
 public LoginForm(MainWindow mV)
 {
     InitializeComponent();
     _r  = new LoginRepo();
     _mV = mV;
     _mV.disableAll();
 }
Ejemplo n.º 4
0
        public ActionResult EvaluationPopupSubmit(DashboardModel model)
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            model.evaluationModel.EvaluatorID = _loggedInUserID;
            if (ModelState.IsValid)
            {
                _evaluationRepo = new EvaluationRepo();
                _repoResponse   = new RepositoryResponse();
                _repoResponse   = _evaluationRepo.AddorUpdateEvaluationData(model.evaluationModel, _loggedInUserID, true);

                _loginRepo = new LoginRepo();
                int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
                int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);
                HttpContext.Session["NotifyCount"] = count;

                return(Json(new { success = _repoResponse.success, message = _repoResponse.message }));
            }
            else
            {
                List <string> fieldOrder = new List <string>(new string[] {
                    "UserName", "Password"
                })
                                           .Select(f => f.ToLower()).ToList();

                var _message1 = ModelState
                                .Select(m => new { Order = fieldOrder.IndexOf(m.Key.ToLower()), Error = m.Value })
                                .OrderBy(m => m.Order)
                                .SelectMany(m => m.Error.Errors.Select(e => e.ErrorMessage)).ToList();

                _message = string.Join("<br/>", _message1);

                return(Json(new { success = false, message = _message1 }));
            }
        }
Ejemplo n.º 5
0
        //string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();
        //long _loggedInUserID = 750002;


        public ActionResult Index()
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();
            int    _empSOMRole     = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            string _dept           = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();
            //Assistant.ConvertHTML2PDF("", "", "");

            DashboardModel model = new DashboardModel();

            _loginRepo = new LoginRepo();

            List <SelectListItem> deptFilter = new List <SelectListItem>();

            if (_empSOMRole == (int)SOMEmpRole.TQCHead || _empSOMRole == (int)SOMEmpRole.Admin)
            {
                deptFilter = _loginRepo.GetDepartmentDetails();
            }
            else if (_empSOMRole == (int)SOMEmpRole.Nomination)
            {
                deptFilter = _loginRepo.GetDepartmentDetails(_dept, _dept);
            }
            else
            {
                deptFilter = _loginRepo.GetDepartmentDetails(_dept, "");
            }
            model.From_Date     = DateTime.Now.ToString("MMMM yyyy");
            model.To_Date       = DateTime.Now.ToString("MMMM yyyy");
            model.DeptFilterlst = deptFilter;

            return(View(model));
        }
Ejemplo n.º 6
0
        public ActionResult assignEvaltorForNomination(DashboardModel model)
        {
            if (ModelState.IsValid)
            {
                _nominationRepo = new NominationRepo();
                _repoResponse   = new RepositoryResponse();
                string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();
                _repoResponse = _nominationRepo.AssignEvalatorToNominationByTQCHead(model, _loggedInUserID);

                _loginRepo = new LoginRepo();
                int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
                int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);
                HttpContext.Session["NotifyCount"] = count;

                return(Json(new { success = _repoResponse.success, message = _repoResponse.message }));
            }
            else
            {
                string        _message   = string.Empty;
                List <string> fieldOrder = new List <string>(new string[] {
                    "UserName", "Password"
                })
                                           .Select(f => f.ToLower()).ToList();

                var _message1 = ModelState
                                .Select(m => new { Order = fieldOrder.IndexOf(m.Key.ToLower()), Error = m.Value })
                                .OrderBy(m => m.Order)
                                .SelectMany(m => m.Error.Errors.Select(e => e.ErrorMessage)).ToList();

                _message = string.Join("<br/>", _message1);

                return(Json(new { success = false, message = _message }));
            }
        }
Ejemplo n.º 7
0
 public HomeController(ISeverityRepo severityRepo, ILoginRepo loginRepo, IUserRepo userRepo, IChecklistRepo checklistRepo)
 {
     _severityRepo  = severityRepo;
     _loginRepo     = loginRepo;
     _userRepo      = userRepo;
     _checklistRepo = checklistRepo;
 }
Ejemplo n.º 8
0
 public UserService(IMapper mapper, ILoginRepo loginRepo, IUserRepo userRepo, IUserCartRepo userCartRepo, ICompaniesService companiesService, IEmailService emailService)
 {
     _mapper           = mapper;
     _loginRepo        = loginRepo;
     _userRepo         = userRepo;
     _userCartRepo     = userCartRepo;
     _companiesService = companiesService;
     _emailService     = emailService;
 }
Ejemplo n.º 9
0
        public ActionResult ApproveNomination()
        {
            DashboardModel model = new DashboardModel();

            _loginRepo    = new LoginRepo();
            _repoResponse = new RepositoryResponse();
            var deptFilter = _loginRepo.GetDepartmentDetails();

            model.DeptFilterlst = deptFilter;
            return(View(model));
        }
Ejemplo n.º 10
0
        public ActionResult Save(NominationModel model, HttpPostedFileBase[] files)
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            _repoResponse   = new RepositoryResponse();
            _nominationRepo = new NominationRepo();

            if (string.IsNullOrEmpty(model.NominationID))
            {
                _repoResponse = _nominationRepo.NominationRestrictionCount(_loggedInUserID);
                if (!_repoResponse.success)
                {
                    return(Json(new { success = _repoResponse.success, message = _repoResponse.message }));
                }
            }

            if (ModelState.IsValid)
            {
                _loginRepo = new LoginRepo();
                //FileUpload(files);

                _repoResponse = _nominationRepo.AddOrEditNominationDetails(_loggedInUserID, model);

                if (_repoResponse.success)
                {
                    _loginRepo = new LoginRepo();
                    int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
                    int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);
                    HttpContext.Session["NotifyCount"] = count;

                    return(Json(new { success = true, message = _repoResponse.message, Data = _repoResponse.Data }));
                }
                else
                {
                    return(Json(new { success = false, message = _repoResponse.message, Data = _repoResponse.Data }));
                }
            }
            else
            {
                List <string> fieldOrder = new List <string>(new string[] {
                    "UserName", "Password"
                })
                                           .Select(f => f.ToLower()).ToList();

                var _message1 = ModelState
                                .Select(m => new { Order = fieldOrder.IndexOf(m.Key.ToLower()), Error = m.Value })
                                .OrderBy(m => m.Order)
                                .SelectMany(m => m.Error.Errors.Select(e => e.ErrorMessage)).ToList();

                _message = string.Join("<br/>", _message1);

                return(Json(new { success = false, message = _message }));
            }
        }
Ejemplo n.º 11
0
        public JsonResult GetEmployeeDataByEmpNumber(string Prefix)
        {
            _loginRepo = new LoginRepo();
            List <AutoCompleteBox> lstAutoCompleteBox = _loginRepo.GetEmpDetailsByEmpName(false);

            var _empData = (from N in lstAutoCompleteBox
                            where N.ID.ToLower().Contains(Prefix.ToLower())
                            select new
            {
                label = N.ID,
                val = N.Value
            }).Distinct();

            return(Json(_empData, JsonRequestBehavior.AllowGet));
        }
        // GET: PanelMembers
        public ActionResult Index()
        {
            PanelMembersModel model = new PanelMembersModel();

            _loginRepo        = new LoginRepo();
            _panelMembersRepo = new PanelMembersRepo();
            var monthFilter = _loginRepo.GetMonthYearFilter();
            var deptFilter  = _loginRepo.GetDepartmentDetails();

            model.DateFilterlst  = monthFilter;
            model.DeptFilterlst  = deptFilter;
            model.MonthFilterlst = _panelMembersRepo.LoadListofMonth(Assistant.GetMonthFromCurrentDate());
            model.YearFilterlst  = _panelMembersRepo.LoadListofFutureYears(5, Assistant.GetYearFromCurrentDate());

            return(View(model));
        }
Ejemplo n.º 13
0
        public ActionResult Reject(NominationModel model)
        {
            _repoResponse   = new RepositoryResponse();
            _nominationRepo = new NominationRepo();
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            _repoResponse = _nominationRepo.NominationFormDHOperations(_loggedInUserID, model, (int)NominationStatus.HoD_Reject);

            _loginRepo = new LoginRepo();
            int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);

            HttpContext.Session["NotifyCount"] = count;

            return(Json(new { success = _repoResponse.success, message = _repoResponse.message }));
        }
Ejemplo n.º 14
0
        // GET: StarOfMonth
        public ActionResult Index()
        {
            _loginRepo        = new LoginRepo();
            _panelMembersRepo = new PanelMembersRepo();
            _statRepo         = new StarOfMonthRepo();
            string sMonth = Assistant.GetMonthFromCurrentDate();
            string sYear  = Assistant.GetYearFromCurrentDate();

            StarOfMonthModel model = new StarOfMonthModel();

            model.DeptFilterlst  = _loginRepo.GetDepartmentDetails();
            model.DateFilterlst  = _loginRepo.GetMonthYearFilter();
            model.MonthFilterlst = _panelMembersRepo.LoadListofMonth(sMonth);
            model.YearFilterlst  = _panelMembersRepo.LoadListofFutureYears(5, sYear);
            //model.NominationIDlst = _statRepo.LoadNominationIDsByEmpID("");
            model.NominationIDlst = _statRepo.LoadNominationIDsEvalCompByMonthAndYear(sMonth, sYear);
            return(View(model));
        }
Ejemplo n.º 15
0
        public ActionResult Delete(int ID)
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            _repoResponse = new RepositoryResponse();
            _statRepo     = new StarOfMonthRepo();

            _repoResponse = _statRepo.DeleteStarOfMonthDetailsByID(ID, _loggedInUserID);
            if (_repoResponse.success)
            {
                _loginRepo = new LoginRepo();
                int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
                int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);
                HttpContext.Session["NotifyCount"] = count;

                return(Json(new { success = true, message = _repoResponse.message }));
            }
            else
            {
                return(Json(new { success = false, message = _repoResponse.message }));
            }
        }
 public LoginController(ILoginRepo Ilogin)
 {
     this.loginRepo = Ilogin;
 }
Ejemplo n.º 17
0
 public LoginManager(ILoginRepo loginRepo)
 {
     this._loginRepo = loginRepo;
 }
Ejemplo n.º 18
0
 public LoginController(ILoginRepo repo)
 {
     _repo = repo;
 }
Ejemplo n.º 19
0
 public AdminLoginController(ILoginRepo loginRepo)
 {
     _loginrepo = loginRepo;
 }
        public ActionResult Index(string dept = "", string fromDate = "", string toDate = "")
        {
            DashboardModel    model     = new DashboardModel();
            ParticipatedCount partModel = new ParticipatedCount();

            repoResponse   = new RepositoryResponse();
            nominationRepo = new NominationRepo();
            loginRepo      = new LoginRepo();
            int    _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            string _dept       = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();

            var monthFilter = loginRepo.GetMonthYearFilter();
            var deptFilter  = loginRepo.GetDepartmentDetails();

            model.From_Nom_DateFilterlst = monthFilter;
            model.DeptFilterlst          = deptFilter;


            if (dept == "--Select--")
            {
                dept = "";
            }
            if (string.IsNullOrEmpty(fromDate))
            {
                fromDate = DateTime.Now.ToString("MMMM yyyy");
            }
            else if (!string.IsNullOrEmpty(fromDate))
            {
                string[] monthYear = fromDate.Split(' ');
                string   month     = monthYear[0].Substring(0, 3);
                string   year      = monthYear[1];
                fromDate = month + "-" + year;
            }

            if (string.IsNullOrEmpty(toDate))
            {
                toDate = DateTime.Now.ToString("MMMM yyyy");
            }
            else if (!string.IsNullOrEmpty(toDate))
            {
                string[] monthYear = toDate.Split(' ');
                string   month     = monthYear[0].Substring(0, 3);
                string   year      = monthYear[1];
                toDate = month + "-" + year;
            }

            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            if (_empSOMRole == (int)SOMEmpRole.TQCHead)
            {
            }
            else if (string.IsNullOrEmpty(dept))
            {
                dept             = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();
                model.DeptFilter = dept;
            }
            repoResponse = nominationRepo.GetReportDetails(_loggedInUserID, dept, fromDate, toDate);

            if (repoResponse.success)
            {
                partModel = repoResponse.Data;
                model.participatedCount = partModel;
            }
            model.From_Date = DateTime.Now.ToString("MMMM yyyy");
            model.To_Date   = DateTime.Now.ToString("MMMM yyyy");

            return(View(model));
        }
Ejemplo n.º 21
0
 public LoginEntity(ILoginRepo loginRepo)
 {
     _loginRepo = loginRepo;
 }
Ejemplo n.º 22
0
 public LoginProvider(ILoginRepo loginRepo)
 {
     _loginRepo = loginRepo;
 }
Ejemplo n.º 23
0
 public Login(LoginImpl logg)
 {
     loginrepo = logg;
 }
Ejemplo n.º 24
0
 public LoginService(ILoginView loginView)
 {
     _listenerLoginDb = new LoginRepo(this);
     _loginView       = loginView;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoginManagerImpl"/> class.
 /// </summary>
 /// <param name="loginRepository">The login repository.</param>
 public ImpLoginManager(ILoginRepo loginRepository)
 {
     this.loginRepository = loginRepository;
 }
Ejemplo n.º 26
0
 //interface define in constructor
 public AccountController(ILoginRepo iloginRepo)
 {
     this.iloginRepo = iloginRepo;
 }
Ejemplo n.º 27
0
 public LoginController(ILoginRepo login)
 {
     _login = login;
 }
Ejemplo n.º 28
0
        public ActionResult Save(StarOfMonthModel model)
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();

            _repoResponse = new RepositoryResponse();
            _statRepo     = new StarOfMonthRepo();

            if (ModelState.IsValid)
            {
                _repoResponse = _statRepo.AddOrEditStarOfMonth(model, _loggedInUserID);
                if (_repoResponse.success)
                {
                    _loginRepo = new LoginRepo();
                    int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
                    int count       = _loginRepo.getActionCounts(_loggedInUserID, _empSOMRole);
                    HttpContext.Session["NotifyCount"] = count;

                    // reload SOM information

                    IStarOfMonthRepo      starOfTheMonth = new StarOfMonthRepo();
                    List <EmpMasterModel> _data          = starOfTheMonth.GetLastThreeStarOftheMonthEmpDetails();
                    if (_data == null)
                    {
                        HttpContext.Session.Add("SOM_Month_Count", "0");
                    }
                    else
                    {
                        HttpContext.Session.Add("SOM_Month_Count", _data.Count);
                    }

                    for (int i = 0; i < _data.Count; i++)
                    {
                        HttpContext.Session.Add("SOM_Month_" + i, _data[i].EMPMonth);
                        HttpContext.Session.Add("SOM_Image_" + i, _data[i].ImagePath);
                    }


                    return(Json(new { success = true, message = _repoResponse.message }));
                }
                else
                {
                    return(Json(new { success = false, message = _repoResponse.message }));
                }
            }
            else
            {
                List <string> fieldOrder = new List <string>(new string[] {
                    "UserName", "Password"
                })
                                           .Select(f => f.ToLower()).ToList();

                var _message1 = ModelState
                                .Select(m => new { Order = fieldOrder.IndexOf(m.Key.ToLower()), Error = m.Value })
                                .OrderBy(m => m.Order)
                                .SelectMany(m => m.Error.Errors.Select(e => e.ErrorMessage)).ToList();

                _message = string.Join("<br/>", _message1);

                return(Json(new { success = false, message = _message }));
            }
        }
 public LoginController(IConfiguration config, ILoginRepo login)
 {
     this._config   = config;
     this.loginRepo = login;
 }
 public AuthenticationService(ILoginRepo loginRepo, IAuthConfig authConfig)
 {
     _loginRepo  = loginRepo;
     _authConfig = authConfig;
 }
Ejemplo n.º 31
0
 public UserLoginController(ILoginRepo loginRepo, ICartRepo cartRepo)
 {
     _loginRepo = loginRepo;
     _cartRepo  = cartRepo;
 }