Exemplo n.º 1
0
        public ActionResult DailyTADAEntry()
        {
            objLoginHelper = (LoginHelper)Session["LogInInformation"];

            if (!securityDal.IsPageAccessible(Helper.ForHRMS, "DailyTADAEntry", objLoginHelper.UerRoleOrGroupID, Helper.Inactive, out message))
            {
                Session["messageInformation"] = message;
                return(RedirectToAction("ErrorMessage", "../ErrorHnadle"));
            }

            ViewBag.Designation = hrmsData.ReadEmployeeDesignation();

            ViewBag.LocationTitle = objLoginHelper.LocationTitle;
            ViewBag.Location      = objLoginHelper.Location;
            ViewBag.ZoneTitle     = objLoginHelper.ZoneTitle;
            ViewBag.ZoneName      = objLoginHelper.LogInForZoneName;
            ViewBag.RegionTitle   = objLoginHelper.RegionTitle;
            ViewBag.RegionName    = objLoginHelper.LogInForRegionName;
            ViewBag.UnitTitle     = objLoginHelper.UnitTitle;
            ViewBag.UnitName      = objLoginHelper.LogInForUnitName;
            ViewBag.OpenMonthYear = "Month: " + objLoginHelper.MonthOpenForHRMS.ToString("MMMM-yy");
            ViewBag.ModuleName    = objLoginHelper.ModluleTitle;
            ViewBag.TopMenu       = objLoginHelper.TopMenu;

            TADADetails objTADADetails = new TADADetails();

            objTADADetails.DateOfTADA         = DateTime.Now.Date;
            objTADADetails.TADAEntryMonth     = DateTime.Now.Month;
            objTADADetails.DaysOfPendingEntry = (byte)(DateTime.Now.Date - objLoginHelper.TransactionOpenDate.Date).Days;
            objTADADetails.Employee           = hrmsData.ReadLocationWiseEmployee(objLoginHelper.LocationCode);
            objTADADetails.MonthList          = new YearMonthFormat().MonthList();

            return(View(objTADADetails));
        }
        public ActionResult FixedAssetRegister()
        {
            objLoginHelper = (LoginHelper)Session["LogInInformation"];

            if (!securityDal.IsPageAccessible(Helper.ForInventory, "FixedAssetRegister", objLoginHelper.UerRoleOrGroupID, Helper.Inactive, out message))
            {
                Session["messageInformation"] = message;
                return(RedirectToAction("ErrorMessage", "../ErrorHnadle"));
            }

            ViewBag.ItemType      = inventoryDal.ReadItemType();
            ViewBag.LocationTitle = objLoginHelper.LocationTitle;
            ViewBag.Location      = objLoginHelper.Location;
            ViewBag.ZoneTitle     = objLoginHelper.ZoneTitle;
            ViewBag.ZoneName      = objLoginHelper.LogInForZoneName;
            ViewBag.RegionTitle   = objLoginHelper.RegionTitle;
            ViewBag.RegionName    = objLoginHelper.LogInForRegionName;
            ViewBag.UnitTitle     = objLoginHelper.UnitTitle;
            ViewBag.UnitName      = objLoginHelper.LogInForUnitName;
            ViewBag.OpenMonthYear = "Month: " + objLoginHelper.MonthOpenForInventory.ToString("MMMM-yy");
            ViewBag.ModuleName    = objLoginHelper.ModluleTitle;
            ViewBag.TopMenu       = objLoginHelper.TopMenu;

            ViewBag.FixedAssetCategory = inventoryDal.ReadItemCategorySubCatagory(Helper.FixedAssets);
            ViewBag.StoreLocation      = inventoryDal.ReadStoreLocation(Helper.FixedAssets);

            List <EmployeeDetailsInfo> lstLocationWiseEmployee = new List <EmployeeDetailsInfo>();

            lstLocationWiseEmployee = hrmsDal.ReadLocationWiseEmployee(objLoginHelper.LogInForUnitCode);
            ArrayList arrEmployee = new ArrayList();

            arrEmployee.Add(new
            {
                EmployeeId   = "ALL",
                EmployeeName = "All Employee"
            });
            //arrEmployee.Add(new
            //{
            //    EmployeeId = "UN-ASSIGNED",
            //    EmployeeName = "Un-Assigned"
            //});

            foreach (EmployeeDetailsInfo lwe in lstLocationWiseEmployee)
            {
                arrEmployee.Add(new
                {
                    EmployeeId   = lwe.EmployeeID,
                    EmployeeName = lwe.EmployeeName
                });
            }

            ViewBag.Employee = arrEmployee;

            return(View());
        }