public ActionResult AddEmployees(EmployeeModel emp)
        {
            DepartmentRepository departmentRepository = new DepartmentRepository();
            var department = departmentRepository.GetDepartments();

            ViewBag.Data1 = department;

            DesignationRepository designationRepository = new DesignationRepository();
            var Designation = designationRepository.GetDesignations();

            ViewBag.Data = Designation;


            EmployeeRepository EmployeeRepositoryObject = new EmployeeRepository();

            //AddEmployee AddEmployeeObject = new AddEmployee();
            if (EmployeeRepositoryObject.AddEmployeeData(emp))
            {
                ViewBag.Msg = "Employee Details are successfully Added";
            }
            else
            {
                ViewBag.Msg = "Employee Details are Not successfully Added";
            }
            return(View(emp));
        }
        public ActionResult Edit(Designation model)
        {
            model.OrganizationId = OrganizationId;
            model.CreatedDate    = System.DateTime.Now;
            model.CreatedBy      = UserID.ToString();


            var  repo     = new DesignationRepository();
            bool isexists = repo.IsFieldExists(repo.ConnectionString(), "Designation", "DesignationName", model.DesignationName, "DesignationId", model.DesignationId);

            if (!isexists)
            {
                var result = new DesignationRepository().UpdateDesignation(model);
                if (result.DesignationId > 0)
                {
                    TempData["Success"]          = "Updated Successfully!";
                    TempData["DesignationRefNo"] = result.DesignationRefNo;
                    return(RedirectToAction("Create"));
                }

                else
                {
                    TempData["error"]            = "Oops!!..Something Went Wrong!!";
                    TempData["DesignationRefNo"] = null;
                    return(View("Create", model));
                }
            }
            else
            {
                TempData["error"]            = "This Name Alredy Exists!!";
                TempData["DesignationRefNo"] = null;
                return(View("Create", model));
            }
        }
示例#3
0
 public UnitOfWork()
 {
     DesignationRepository                = new DesignationRepository(context);
     UserRepository                       = new UserRepository(context);
     RoleRepository                       = new RoleRepository(context);
     BuildingTypeRepository               = new BuildingTypeRepository(context);
     RoofTypeRepository                   = new RoofTypeRepository(context);
     DefactsRepository                    = new DefactsRepository(context);
     ConstructionPartsRepository          = new ConstructionPartsRepository(context);
     BuildingRepository                   = new BuildingRepository(context);
     RoofComponentsRepository             = new RoofComponentRepository(context);
     InspectionRepository                 = new InspectionRepository(context);
     RoofRepository                       = new RoofRepository(context);
     RoofElementRepository                = new RoofElementRepository(context);
     RoofDetailElementConditionRepository = new RoofDetailElementConditionRepository(context);
     ObservedDefectRepository             = new ObservedDefectRepository(context);
     RoofConstructionRepository           = new RoofConstructionRepository(context);
     ElementConstructionRepository        = new ElementConstructionRepository(context);
     RoofAdvicesMaintenanceRepository     = new RoofAdvicesMaintenanceRepository(context);
     BuildingAdviceMaintenanceRepository  = new BuildingAdviceMaintenanceRepository(context);
     BuildingPicturesRepository           = new BuildingPictureRepository(context);
     ContractDutiesRepository             = new ContractDutiesRepository(context);
     BuildingDocumentsRepository          = new BuildingDocumentsRepository(context);
     TaskMastersRepository                = new TaskMastersRepository(context);
 }
 public UnitOfWork(CallCenterContext context)
 {
     _context     = context;
     Employees    = new EmployeeRepository(_context);
     Designations = new DesignationRepository(_context);
     Reclamations = new ReclamationRepository(_context);
 }
        //    var result = new DesignationRepository().InsertDesignation(model);

        //    if (result.DesignationId > 0)
        //    {
        //        TempData["Success"] = "Added Successfully!";
        //        TempData["DesignationRefNo"] = result.DesignationRefNo;
        //        return RedirectToAction("Create");
        //    }
        //    else
        //    {
        //        TempData["error"] = "Oops!!..Something Went Wrong!!";
        //        TempData["DesignationRefNo"] = null;
        //        return View("Create", model);
        //    }
        //}

        public ActionResult Edit(int Id)
        {
            ViewBag.Title = "Edit";
            Designation objDesignation = new DesignationRepository().GetDesignation(Id);

            return(View("Create", objDesignation));
        }
        public ActionResult Delete(Designation model)
        {
            int result = new DesignationRepository().DeleteDesignation(model);

            if (result == 0)
            {
                TempData["Success"]          = "Deleted Successfully!";
                TempData["DesignationRefNo"] = model.DesignationRefNo;
                return(RedirectToAction("Create"));
            }
            else
            {
                if (result == 1)
                {
                    TempData["error"]            = "Sorry!! You Cannot Delete This Designation It Is Already In Use";
                    TempData["DesignationRefNo"] = null;
                }
                else
                {
                    TempData["error"]            = "Oops!!..Something Went Wrong!!";
                    TempData["DesignationRefNo"] = null;
                }
                return(RedirectToAction("Create"));
            }
        }
 public EmployeeController()
 {
     repository       = new EmployeeRepository();
     services         = new EmployeeServices();
     deptRepository   = new DepartmentRepository();
     branchRepository = new BranchRepository();
     desigRepository  = new DesignationRepository();
 }
示例#8
0
 public DesignationController(DesignationRepository designationRepository, DesignationService designationService, IMapper mapper, PaginatedMetaService paginatedMetaService, FileHelper fileHelper)
 {
     _designationRepository = designationRepository;
     _designationService    = designationService;
     _mapper = mapper;
     _paginatedMetaService = paginatedMetaService;
     _fileHelper           = fileHelper;
 }
示例#9
0
        public UnitOfWork(ApplicationDbContext context)
        {
            _context       = context;
            ProductDetails = new ReservationDetailsRepository(_context);
            Products       = new ProductRepository(_context);

            ProductCategories = new ProductCategoryRepository(_context);

            Services = new ServiceRepository(_context);

            ServiceCategories = new ServiceCategoryRepository(_context);

            Departments = new DepartmentRepository(_context);

            Menus = new MenuRepository(_context);

            SubMenus = new SubMenuRepository(_context);

            OurTeams = new OurTeamRepository(_context);

            Designations = new DesignationRepository(_context);

            Faq = new FaqRepository(_context);

            Client = new ClientRepository(_context);

            Blogs = new BlogRepository(_context);

            ContactUs = new ContactUsRepository(_context);

            Companies = new CompanyRepository(_context);

            Banner = new BannerRepository(_context);

            ChooseUs = new WhyChooseUsRepository(_context);

            ClientProducts = new ClientProductRepository(_context);

            AboutUs = new AboutUsRepository(_context);

            HostingPlan = new HostingPlanRepository(_context);

            CustomerReview = new CustomerReviewRepository(_context);

            Career = new CareerRepository(_context);

            Job = new JobRepository(_context);

            Softwares = new SoftwareRepository(_context);

            SoftwareCategories = new SoftwareCategoriesRepository(_context);

            Features = new FeaturesRepository(_context);

            BlogComment = new BlogCommentRepository(_context);

            QueryHelper = new QueryHelper();
        }
        public ActionResult FillDesignationList(int?page)
        {
            int itemsPerPage = 10;
            int pageNumber   = page ?? 1;
            var repo         = new DesignationRepository();
            var List         = repo.FillDesignationList();

            return(PartialView("DesignationListView", List));
        }
 public UnitOfWork(ApplicationDbContext context)
 {
     _context     = context;
     Employees    = new EmployeeRepository(_context);
     Designations = new DesignationRepository(_context);
     Departments  = new DepartmentRepository(_context);
     Reclamations = new ReclamationRepository(_context);
     SoldDevices  = new SoldDevicesRepository(_context);
 }
        /// <summary>
        /// Initializes a new instance of the DesignationService class.
        /// </summary>
        /// <param name="unitOfWork">UnitOfWork information</param>
        public DesignationService(UnitOfWork unitOfWork)
        {
            if (unitOfWork == null)
            {
                throw new ArgumentNullException(UnitOfWorkConst);
            }

            this.unitOfWork = unitOfWork;
            this.designationRepository = new DesignationRepository(this.unitOfWork);
        }
 public MembersController(MembersService membersService, MembersRepository membersRepository, IMapper mapper, PaginatedMetaService paginatedMetaService, FileHelper fileHelper, DesignationRepository designationRepository, FiscalYearRepository fiscalYearRepository)
 {
     _membersRepository     = membersRepository;
     _membersService        = membersService;
     _mapper                = mapper;
     _paginatedMetaService  = paginatedMetaService;
     _fiscalYearRepository  = fiscalYearRepository;
     _designationRepository = designationRepository;
     _fileHelper            = fileHelper;
 }
 public UnitOfWork()
 {
     Designation   = new DesignationRepository(context);
     User          = new UserRepository(context);
     Project       = new ProjectRepository(context);
     File          = new Repository <File>(context);
     AssignProject = new AssignedUserRepository(context);
     Tasks         = new TaskRepository(context);
     Comment       = new CommentRepository(context);
     UserAccess    = new Repository <UserAccess>(context);
 }
 public UnitOfWork()
 {
     Category    = new CategoryRepository(context);
     Product     = new ProductRepository(context);
     Designation = new DesignationRepository(context);
     Employee    = new EmployeeRepository(context);
     User        = new UserRepository(context);
     OrderInfo   = new OrderRepository(context);
     Order       = new OrderItemRepository(context);
     Delivery    = new DeliveryRepository(context);
     UserAccess  = new UserAccessRepository(context);
 }
        public DonationInformation()
        {
            //dtpDate.MinDate = DateTime.Now;
            this.MaximizeBox = false;
            InitializeComponent();

            dtpEnglishDateType.Format = DateTimePickerFormat.Custom;
            dtpEnglishDateType.CustomFormat = "dd/MM";

            donorRepo = new DonorRepository();
            datetypeRepo = new DateTypeRepository();
            desigRepo = new DesignationRepository();
            employeeRepo = new EmployeeRepository();
            prefixRepo = new PrefixesRepository();
            roleRepo = new RoleRepository();
            serviceNameRepo = new ServiceNameRepository();
            serviceTypeRepo = new ServiceTypeRepository();
            specialDayRepo = new SpecialDayRepository();
            starRepo = new StarsRepository();
            monthsRepo = new MonthsRepository();
            pakshaRepo = new PakshaRepository();
            thithiRepo = new ThidhiRepository();
            monthlyAnnaRepo = new MonthlyAnnaRepository();
            gothramRepo = new GothramsRepository();
            transTypeRepo = new TransactionTypeRepository();
            lstTokenPrint = new List<TokenPrint>();
            stateRepo = new StateRepository();
            lstStates = new List<State>();
            prefixesRepo = new PrefixesRepository();

            bindData();
            btnUpdate.Visible = false;
            btnCancel.Visible = false;

            lblSpecialDay.Visible = false;
            cmbSpecialDay.Visible = false;
            lblMonth.Visible = false;
            cmbMonth.Visible = false;
            lblThithi.Visible = false;
            cmbThithi.Visible = false;
            lblMonthlyAnna.Visible = false;
            cmbMonthlyAnna.Visible = false;
            lblEnglishDatetype.Visible = false;
            dtpEnglishDateType.Visible = false;
            rbdEnglish.Checked = false;
            rbdTelugu.Checked = false;
            lblMonthyAnnaThithi.Visible = false;
            cmbMonthyAnnaThithi.Visible = false;
        }
        public IActionResult DeleteEmployee(int ID)
        {
            EmployeeRepository   EmployeeRepositoryObject = new EmployeeRepository();
            DepartmentRepository departmentRepository     = new DepartmentRepository();
            var department = departmentRepository.GetDepartments();

            ViewBag.Data1 = department;

            DesignationRepository designationRepository = new DesignationRepository();
            var Designation = designationRepository.GetDesignations();

            ViewBag.Data = Designation;

            return(View(EmployeeRepositoryObject.GetEmployees().Find(asd => asd.ID == ID)));
        }
        public IActionResult GetEmployees()
        {
            EmployeeRepository EmployeeRepositoryObject = new EmployeeRepository();

            ModelState.Clear();
            DepartmentRepository departmentRepository = new DepartmentRepository();
            var department = departmentRepository.GetDepartments();

            ViewBag.Data1 = department;

            DesignationRepository designationRepository = new DesignationRepository();
            var Designation = designationRepository.GetDesignations();

            ViewBag.Data = Designation;

            return(View(EmployeeRepositoryObject.GetEmployees()));
        }
        public IActionResult AddEmployees()
        {
            DepartmentRepository departmentRepository = new DepartmentRepository();
            var department = departmentRepository.GetDepartments();

            ViewBag.Data1 = department;

            DesignationRepository designationRepository = new DesignationRepository();
            var Designation = designationRepository.GetDesignations();

            ViewBag.Data = Designation;

            //DesignationRepository designationRepository = new DesignationRepository();
            //ViewBag["Designation"] = designationRepository.GetDesignations();
            //DesignationRepository designationRepository = new DesignationRepository();
            //ViewBag["Designation"] = designationRepository.GetDesignations();

            return(View());
        }
        public IActionResult UpdateEmployee(int ID, EmployeeModel s1)
        {
            DepartmentRepository departmentRepository = new DepartmentRepository();
            var department = departmentRepository.GetDepartments();

            ViewBag.Data1 = department;

            DesignationRepository designationRepository = new DesignationRepository();
            var Designation = designationRepository.GetDesignations();

            ViewBag.Data = Designation;

            EmployeeRepository EmployeeRepositoryObject = new EmployeeRepository();

            if (EmployeeRepositoryObject.UpdateEmployeeData(s1))
            {
                return(RedirectToAction("GetEmployees"));
            }
            else
            {
                return(View());
            }
        }
 public DesignationUnitOfWork(AssetDbContext context)
 {
     _context    = context;
     Designation = new DesignationRepository(_context);
 }
示例#22
0
 public DesignationService()
 {
     repo = new DesignationRepository();
 }
 static DesignationServices()
 {
     repository = new DesignationRepository();
 }
        public override T CreateProcessor()
        {
            switch (typeof(T).Name)
            {
            case "IAuthRepository":
                IAuthRepository _processor = new AuthRepository(config);
                return((T)_processor);

            case "IJobPostRepository":
                IJobPostRepository _jobPostprocessor = new JobPostRepository(config);
                return((T)_jobPostprocessor);

            case "IHomeRepositories":
                IHomeRepositories _homeRepositories = new HomeRepositories(config);
                return((T)_homeRepositories);

            case "ISearchJobRepository":
                ISearchJobRepository _searchJobRepository = new SearchJobRepository(config);
                return((T)_searchJobRepository);

            case "IUserProfileRepository":
                IUserProfileRepository _userProfileRepository = new UserProfileRepository(config);
                return((T)_userProfileRepository);

            case "ISearchResumeRepository":
                ISearchResumeRepository _searchResumeRepository = new SearchResumeRepository(config);
                return((T)_searchResumeRepository);

            case "IManageUserRepository":
                IManageUserRepository _manageUserRepository = new ManageUsersRepository(config);
                return((T)_manageUserRepository);

            case "IEmpProfileRepository":
                IEmpProfileRepository _empProfileRepository = new EmpProfileRepository(config);
                return((T)_empProfileRepository);

            case "IJobIndustryAreaRepository":
                IJobIndustryAreaRepository _jobIndustryAreaRepository = new JobIndustryAreaRepositroy(config);
                return((T)_jobIndustryAreaRepository);

            case "IJobTitleRepositroy":
                IJobTitleRepositroy _jobTitleRepositroy = new JobTitleRepository(config);
                return((T)_jobTitleRepositroy);

            case "IDesignationRepository":
                IDesignationRepository _designationRepository = new DesignationRepository(config);
                return((T)_designationRepository);

            case "IResumeBuilderRepository":
                IResumeBuilderRepository rBuilderRepository = new ResumeBuilderRepository(config);
                return((T)rBuilderRepository);

            case "IMasterDataRepository":
                IMasterDataRepository masterDataRepository = new MasterDataRepository(config);
                return((T)masterDataRepository);

            case "ISuccessStoryVideoRepository":
                ISuccessStoryVideoRepository successStoryVideoRepository = new SuccessStoryVideoRepository(config);
                return((T)successStoryVideoRepository);

            case "IBulkJobPostRepository":
                IBulkJobPostRepository bulkJobRepository = new BulkJobPostRepository(config);
                return((T)bulkJobRepository);

            case "IEmailRepository":
                IEmailRepository _emailRepository = new EmailRepository(config);
                return((T)_emailRepository);

            case "IUsersReviewsRepository":
                IUsersReviewsRepository usersReviewsRepository = new UsersReviewsRepository(config);
                return((T)usersReviewsRepository);

            case "IManageJobsRepository":
                IManageJobsRepository manageJobsRepository = new ManageJobsRepository(config);
                return((T)manageJobsRepository);

            case "IDashboardRepository":
                switch (typeof(T).FullName)
                {
                case "JobPortal.Data.Interfaces.Employer.IDashboardRepository":
                    Data.Interfaces.Employer.IDashboardRepository employerDashboard = new Data.Repositories.Employer.DashboardRepository(config);
                    return((T)employerDashboard);

                case "JobPortal.Data.Interfaces.TrainingPartner.IDashboardRepository":
                    Data.Interfaces.TrainingPartner.IDashboardRepository tpDashboard = new Data.Repositories.TrainingPartner.DashboardRepository(config);
                    return((T)tpDashboard);

                case "JobPortal.Data.Interfaces.Admin.IDashboardRepository":
                    Data.Interfaces.Admin.IDashboardRepository adminDashboard = new Data.Repositories.Admin.DashboardRepository(config);
                    return((T)adminDashboard);

                default:
                    throw new Exception("Can not create object");
                }

            case "ITrainingPartnerProfileRepository":
                ITrainingPartnerProfileRepository trainingPartnerProfileRepository = new TrainingPartnerProfileRepository(config);
                return((T)trainingPartnerProfileRepository);

            case "IManageCityStateRepository":
                IManageCityStateRepository manageCityStateRepository = new ManageCityStateRepository(config);
                return((T)manageCityStateRepository);

            case "INotificationRepository":
                INotificationRepository nRepository = new NotificationRepository(config);
                return((T)nRepository);

            case "IPlacedCandidateRepository":
                IPlacedCandidateRepository placedCandidateRepository = new PlacedCandidateRepository(config);
                return((T)placedCandidateRepository);

            case "IAdvertisementsRepository":
                IAdvertisementsRepository advertisementsRepository = new AdvertisementsRepository(config);
                return((T)advertisementsRepository);

            case "IEmailTemplateRepository":
                IEmailTemplateRepository emailTemplateRepository = new EmailTemplateRepository(config);
                return((T)emailTemplateRepository);

            default:
                throw new Exception("Can not create object");
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DemoUnitOfWork"/> class.
 /// </summary>
 public DemoUnitOfWork()
 {
     DataContext           = new DemoDataContext();
     EmployeeRepository    = new EmployeeRepository(DataContext);
     DesignationRepository = new DesignationRepository(DataContext);
 }
 public DesignationServiceImpl(DesignationRepository DesignationRepository, DesignationMaker DesignationMaker, IHostingEnvironment hostingEnvironment)
 {
     _DesignationMaker      = DesignationMaker;
     _DesignationRepository = DesignationRepository;
     _hostingEnvironment    = hostingEnvironment;
 }