Example #1
0
        public ActionResult SelectCompany()
        {
            //DatabaseName = "RetailManagement";
            //CompanyName = "RetailManagement";
            //FinancialYear = "RetailManagement";
            DatabaseName  = "A2ZRetail";
            CompanyName   = "A2ZRetail";
            FinancialYear = "A2ZRetail";
            MainApplication model         = new MainApplication();
            var             usercompanies = _userService.GetUserByName((string)HttpContext.Session["UserName"]);

            model.EmployeeCompanyList = _EmployeesCompanyService.GetAllEmployeeCompaniesByEmpCode(usercompanies.UserCode);
            List <Company> CompanyList = new List <Company>();

            foreach (var compname in model.EmployeeCompanyList)
            {
                var detail = _companyService.GetCompanyDataByCompCode(compname.CompanyCode);
                CompanyList.Add(detail);
            }
            model.CmpList          = CompanyList;
            Session["CompanyList"] = _companyService.getAllCompanies();
            return(View(model));
        }