Пример #1
0
        public ActionResult Create()
        {
            MainApplication model = new MainApplication()
            {
                EmployeeDetails = new EmployeeMaster(),
            };
            EmployeeMaster emp    = _EmployeeMasterService.getLastInsertedEmp();
            int            lastid = 0;
            int            length = 0;

            if (emp != null)
            {
                lastid = emp.EmpId;
                lastid = lastid + 1;
                length = lastid.ToString().Length;
            }
            else
            {
                lastid = 1;
                length = 1;
            }
            string catCode = _utilityservice.getName("EMP", length, lastid);

            model.EmployeeDetails.EmployeeCode = catCode;
            TempData["employeecode"]           = catCode;

            string mssgbox = string.Empty;

            model.BloodGroups                     = _BloodGroupService.GetBloodGroup();
            model.totalExpYears                   = _YearExperienceService.GetYearExp();
            model.totalExpmonths                  = _MonthExperienceService.GetMonthExp();
            model.TypeOfSupplierList              = _TypeOfSupplierService.GetTypeOfSuppliers();
            model.StateList                       = _stateService.GetStateByCountry(1);
            model.EmployeeDetails.deptlist        = _departmentservive.getAllDepartments();
            model.EmployeeDetails.DesignationList = _DesignationMasterService.GetDesignations();
            model.EmployeeDetails.BankNameList    = _BankNameService.getAllBankNames();
            model.EmployeeDetails.deptlist        = _departmentservive.getAllDepartments();
            model.userCredentialList              = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist                      = _iIModuleService.getAllModules();
            model.CompanyCode                     = CompanyCode;
            model.CompanyName                     = CompanyName;
            model.FinancialYear                   = FinancialYear;
            return(View(model));
        }
Пример #2
0
        public ActionResult CreateJobWorker()
        {
            MainApplication model = new MainApplication()
            {
                JobWorkerDetails = new JobWorker(),
            };
            JobWorker worker = _JobWorkerService.GetLastRow();
            int       Val    = 0;
            int       length = 0;

            if (worker != null)
            {
                Val    = worker.Id;
                Val    = Val + 1;
                length = Val.ToString().Length;
            }
            else
            {
                Val    = 1;
                length = 1;
            }
            string code = _utilityService.getName("JW", length, Val);

            model.JobWorkerDetails.Code   = code;
            TempData["PreviousJobWorker"] = code;

            string mssgbox = string.Empty;

            model.BankNameList       = _BankNameService.getAllBankNames();
            model.StateList          = _StateService.GetStateByCountry(1);
            model.BloodGroups        = _BloodGroupService.GetBloodGroup();
            model.totalExpYears      = _YearExperienceService.GetYearExp();
            model.totalExpmonths     = _MonthExperienceService.GetMonthExp();
            model.DepartmentList     = _DepartmentService.getAllDepartments();
            model.DesignationList    = _DesignationMasterService.getAllDesignation();
            model.TypeOfSupplierList = _TypeOfSupplierService.GetTypeOfSuppliers();

            model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist         = _ModuleService.getAllModules();
            model.CompanyCode        = CompanyCode;
            model.CompanyName        = CompanyName;
            model.FinancialYear      = FinancialYear;
            return(View(model));
        }