// GET: EmployerDetails/Edit/5 //[EncryptedActionParameter] public ActionResult Edit(int id) { //if (id == null) //{ // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); //} //int id1 = (int)id; using (var unitOfWork = new UnitWork1(new EAMSContext())) { //int id=5; var emplyrDtls = unitOfWork.EmployerDetails.Get(id); unitOfWork.Complete(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <EmployerDetails, EmployerDetailsUpVM>(); }); IMapper mapper = config.CreateMapper(); EmployerDetailsUpVM UpdateDto = mapper.Map <EmployerDetails, EmployerDetailsUpVM>(emplyrDtls); ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); ViewBag.States = unitOfWork.StateMasters.GetStates(); //ViewBag.Cities = unitOfWork.CityMasters.GetCitiesByStateId(); ViewData["SelectedCity"] = emplyrDtls.CityId; //if (UpdateDto == null) //{ // return HttpNotFound(); //} return(View(UpdateDto)); } }
public ActionResult Create(SponsorDataCreateVM objSponCrtVm, int[] SelChkEsmIds) { try { using (var unitOfWork = new UnitWork1(new EAMSContext())) { if (SelChkEsmIds != null) { objSponCrtVm.iESMOffrDetails = new List <ESMOfficersDetail>(); foreach (var esmId in SelChkEsmIds) { var esmIdToAdd = unitOfWork.ESMDetails.SingleOrDefault(x => x.EsmId == esmId); objSponCrtVm.iESMOffrDetails.Add(esmIdToAdd); } } var config = new MapperConfiguration(cfg => { cfg.CreateMap <SponsorDataCreateVM, SponsorData>(); }); IMapper mapper = config.CreateMapper(); SponsorData CreateDto = mapper.Map <SponsorDataCreateVM, SponsorData>(objSponCrtVm); unitOfWork.SponsorDatas.Add(CreateDto); //ViewData["SelectedOrg"] = objSponCrtVm.ComapnyId; //ViewData["Vacancy"] = objSponCrtVm.VacancyId; unitOfWork.Complete(); return(RedirectToAction("Index")); } } catch { return(View()); } }
public ActionResult Create(RegEAMSJcoCreate objEAMSJcoCr) { try { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var config = new MapperConfiguration(cfg => { cfg.CreateMap <RegEAMSJcoCreate, RegistrationEAMSJco>(); }); IMapper mapper = config.CreateMapper(); RegistrationEAMSJco CreateDto = mapper.Map <RegEAMSJcoCreate, RegistrationEAMSJco>(objEAMSJcoCr); unitOfWork.RegEAMSJCOs.Add(CreateDto); ViewData["SelectedCityC"] = objEAMSJcoCr.CCityId; ViewData["SelectedCityP"] = objEAMSJcoCr.PCityId; ViewData["SelectedRankID"] = objEAMSJcoCr.Ranks; unitOfWork.Complete(); return(RedirectToAction("Index")); } } catch { return(View()); } }
private void GetMonthlyPMOData(UnitWork1 unitOfWork, IEnumerable <SponsorData> sponsrdata, IEnumerable <ESMJcoORsDetail> esmData, IEnumerable <CompanyMaster> companyData) { var MonthPmoRecord = from s in sponsrdata //where (s.SponsorShipDate.Date >= Convert.ToDateTime("20 sep 2018") && s.SponsorShipDate.Date <= DateTime.Now.Date) from es in s.iESMJcoDetails join e in esmData on es.EsmId equals e.EsmId into table1 from e in table1.ToList() join c in companyData on e.CompanyId equals c.CompanyId into table2 from c in table2.ToList() //join select new MonthlyPMOJcoVM { Sponsors = s, EsmJcoOr = e, Companys = c }; unitOfWork.Complete(); int TtlEsmSponsoredGovt = MonthPmoRecord.Where(x => x.Companys.CompanyType == "Govt").ToList().Count; int TtlEsmSponsoredPvt = MonthPmoRecord.Where(x => x.Companys.CompanyType == "Pvt").ToList().Count; var MonPmoDt = new MothlyJCOPMODataVM() { EsmSponsoredGovt = TtlEsmSponsoredGovt, EsmSponsoredPvt = TtlEsmSponsoredPvt, }; ViewBag.MonPmoData = MonPmoDt; }
public JsonResult GetRanks(string ServiceType) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var ranksdata = unitOfWork.RankMasters.GetCustRanks("Officer", ServiceType); unitOfWork.Complete(); return(Json(ranksdata, JsonRequestBehavior.AllowGet)); } }
public JsonResult GetEamsDatas(long VacancyId) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var Eamsdata = unitOfWork.ESMDetails.GetAll(); unitOfWork.Complete(); return(Json(Eamsdata, JsonRequestBehavior.AllowGet)); } }
public JsonResult GetEAMSDetail2(long vacancyId) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var esmdata = unitOfWork.ESMDetails.GetEsmOffrByVacancy(vacancyId); unitOfWork.Complete(); return(Json(esmdata, JsonRequestBehavior.AllowGet)); } }
public JsonResult GetJobPosts(long companyid) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var jobpostsdata = unitOfWork.VacancyMasters.GetPostsByCompanyId(companyid); unitOfWork.Complete(); return(Json(jobpostsdata, JsonRequestBehavior.AllowGet)); } }
public JsonResult GetCity(long stateId) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var citydata = unitOfWork.CityMasters.GetCitiesByStateId(stateId); unitOfWork.Complete(); return(Json(citydata, JsonRequestBehavior.AllowGet)); } }
// GET: NotingDetails/Create public ActionResult Create() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); unitOfWork.Complete(); return(View()); } }
// GET: ESMJcoExcel public ActionResult ExcelFileUpload() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); ViewBag.SainikBoards = unitOfWork.Sainikboards.GetSainikboard(); unitOfWork.Complete(); return(View()); } }
public JsonResult GetEAMSDetail(long vacancyId, string PersonType) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { if (PersonType == "O") { //var esmdata = unitOfWork.ESMDetails.GetEsmOffrByVacancy(vacancyId); EmsVacancyData var esmdata1 = unitOfWork.ESMDetails.Find(x => x.VacancyId == vacancyId).ToList(); List <EmsVacancyData> esmdata = new List <EmsVacancyData>(); foreach (var esm in esmdata1) { EmsVacancyData objesm = new EmsVacancyData(); objesm.EsmId = esm.EsmId; objesm.ServiceNo = esm.ServiceNo; objesm.Name = esm.Name; objesm.DateofBirth = esm.DateofBirth; objesm.RankName = esm.Ranks.RankName.ToString(); esmdata.Add(objesm); } unitOfWork.Complete(); return(Json(esmdata, JsonRequestBehavior.AllowGet)); } else { var esmdata1 = unitOfWork.ESMJcoDetails.Find(x => x.VacancyId == vacancyId).ToList(); List <EmsVacancyData> esmdata = new List <EmsVacancyData>(); foreach (var esm in esmdata1) { EmsVacancyData objesm = new EmsVacancyData(); objesm.EsmId = esm.EsmId; objesm.ServiceNo = esm.ServiceNo; objesm.Name = esm.Name; objesm.DateofBirth = esm.DateofBirth; objesm.RankName = esm.Ranks.RankName.ToString(); esmdata.Add(objesm); } unitOfWork.Complete(); return(Json(esmdata, JsonRequestBehavior.AllowGet)); } } }
public JsonResult GetRanks(string ServiceType) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var jobpostsdata = unitOfWork.RankMasters.GetCustRanks("JCOOR", ServiceType); //ViewBag.Rank = unitOfWork.RankMasters.GetCustRanks("JCOOR","Army"); unitOfWork.Complete(); return(Json(jobpostsdata, JsonRequestBehavior.AllowGet)); } }
// GET: OutcomeDetails/Create public ActionResult Create() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); //ViewBag.Vacancies = unitOfWork.VacancyMasters.GetPostsByCompanyId(); //ViewBag.Easm = unitOfWork.ESMDetails.GetESMs(); unitOfWork.Complete(); return(View()); } }
// GET: ESMJcoORsDetail/Create public ActionResult Create() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); ViewBag.Qualification = unitOfWork.QualificationMasters.GetQualifications(); ViewBag.sainik = unitOfWork.Sainikboards.GetSainikboard(); unitOfWork.Complete(); return(View()); } }
// GET: VacancyMaster/Create public ActionResult Create() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { ViewBag.Companies = unitOfWork.CompanyMasters.GetCompanies(); ViewBag.States = unitOfWork.StateMasters.GetStates(); ViewBag.Qualifications = unitOfWork.QualificationMasters.GetQualifications(); ViewBag.Grades = unitOfWork.GradeMasters.GetGrades(); ViewData["SelectedCity"] = string.Empty; unitOfWork.Complete(); return(View()); } }
private void MonthlySponsrData(UnitWork1 unitOfWork, List <ESMOfficersDetail> esmData) { var companyData = unitOfWork.CompanyMasters.GetAll(); var vacancyData = unitOfWork.VacancyMasters.GetAll(); var MonthSponserOffrsRecord = from e in esmData join c in companyData on e.CompanyId equals c.CompanyId into table1 from c in table1.ToList() join v in vacancyData on e.VacancyId equals v.VacancyId into table2 from v in table2 select new MonthlySponsershipOffrsRptVm { Companys = c, EsmOffrsDtls = e, Vacancys = v }; var cmpnydt = (from c in companyData join e in esmData on c.CompanyId equals e.CompanyId into table1 from e in table1 select new CompanyMasterCreateVM { CompanyId = c.CompanyId, CompanyName = c.CompanyName }).ToList().GroupBy(t => t.CompanyId).Select(grp => grp.First()); var vcncydt = (from v in vacancyData join e in esmData on v.VacancyId equals e.VacancyId into table1 from e in table1 select new VacancyDetailsCrtVM { VacancyId = v.VacancyId, PostName = v.PostName, CompanyId = v.CompanyId }).ToList().GroupBy(t => t.VacancyId).Select(grp => grp.First()); unitOfWork.Complete(); List <SelectListItem> companies = esmData .OrderBy(n => n.CompanyId) .GroupBy(x => x.CompanyId).Select(x => x.First()) .Select(n => new SelectListItem { Value = n.CompanyId.ToString(), Text = n.Companys.CompanyName }).ToList(); ViewBag.Companies = cmpnydt; ViewBag.Vacancies = vcncydt; ViewBag.Esmdatas = esmData; }
// GET: RegistrationEAMSJcosDetail public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var EAMSJCOs = unitOfWork.RegEAMSJCOs.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <RegistrationEAMSJco, RegEAMSJcoIndex>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <RegistrationEAMSJco>, IEnumerable <RegEAMSJcoIndex> >(EAMSJCOs); unitOfWork.Complete(); return(View(indexDto)); } }
public ViewResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var rnkMstr = unitOfWork.RankMasters.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <RankMaster, RankMasterVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <RankMaster>, IEnumerable <RankMasterVM> >(rnkMstr); unitOfWork.Complete(); return(View(indexDto)); } }
public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var sponDtls = unitOfWork.SponsorDatas.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <SponsorData, SponsorDataIndexVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <SponsorData>, IEnumerable <SponsorDataIndexVM> >(sponDtls); unitOfWork.Complete(); return(View(indexDto)); } }
// GET: VacancyMaster public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var vcyMstr = unitOfWork.VacancyMasters.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <VacancyMaster, VacancyDetailsIndxVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <VacancyMaster>, IEnumerable <VacancyDetailsIndxVM> >(vcyMstr); unitOfWork.Complete(); return(View(indexDto)); } }
// GET: QualificationMaster/Edit/5 public ActionResult Edit(int id) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var qualtnMstr = unitOfWork.QualificationMasters.Get(id); unitOfWork.Complete(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <QualificationMaster, QualificationMasterUpVM>(); }); IMapper mapper = config.CreateMapper(); QualificationMasterUpVM UpdateDto = mapper.Map <QualificationMaster, QualificationMasterUpVM>(qualtnMstr); return(View(UpdateDto)); } }
public ViewResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var qualtnMstr = unitOfWork.QualificationMasters.GetAll().ToList(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <QualificationMaster, QualificationMasterIndxVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <QualificationMaster>, IEnumerable <QualificationMasterIndxVM> >(qualtnMstr); unitOfWork.Complete(); return(View(indexDto)); } }
// GET: ESMJcoORsDetail public ViewResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var OffrDtls = unitOfWork.ESMJcoDetails.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <ESMJcoORsDetail, ESMJcoIndexVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <ESMJcoORsDetail>, IEnumerable <ESMJcoIndexVM> >(OffrDtls); unitOfWork.Complete(); return(View(indexDto)); } }
public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var OffrDtls = unitOfWork.PBORSpopnserships.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <PBORSponsorshipDetail, PBORsponserDetailsIndxVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <PBORSponsorshipDetail>, IEnumerable <PBORsponserDetailsIndxVM> >(OffrDtls); unitOfWork.Complete(); return(View(indexDto)); } }
public ViewResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var sainik = unitOfWork.Sainikboards.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <SainikBoardDetails, SainikBoardIndexVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <SainikBoardDetails>, IEnumerable <SainikBoardIndexVM> >(sainik); unitOfWork.Complete(); return(View(indexDto)); } }
// GET: RankMaster/Edit/5 public ActionResult Edit(int id) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var rankMstr = unitOfWork.RankMasters.Get(id); var config = new MapperConfiguration(cfg => { cfg.CreateMap <RankMasterVM, RankMaster>(); }); IMapper mapper = config.CreateMapper(); RankMasterVM UpdateDto = mapper.Map <RankMaster, RankMasterVM>(rankMstr); unitOfWork.Complete(); return(View(UpdateDto)); } }
// GET: EmployerDetails public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var emplyrDtls = unitOfWork.EmployerDetails.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <EmployerDetails, EmployerDetailsIndxVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <EmployerDetails>, IEnumerable <EmployerDetailsIndxVM> >(emplyrDtls); unitOfWork.Complete(); return(View(indexDto)); } }
public ActionResult Index() { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var Regs = unitOfWork.Registrations.GetAll(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <RegistrationESMOffrs, RegsESMOffrsIndexVM>(); }); IMapper mapper = config.CreateMapper(); var indexDto = mapper.Map <IEnumerable <RegistrationESMOffrs>, IEnumerable <RegsESMOffrsIndexVM> >(Regs); unitOfWork.Complete(); return(View(indexDto)); } }
// GET: ESMJcoORsDetail/Edit/5 public ActionResult Edit(int id) { using (var unitOfWork = new UnitWork1(new EAMSContext())) { var emsoffrDtls = unitOfWork.ESMJcoDetails.Get(id); unitOfWork.Complete(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <ESMJcoORsDetail, ESMJcoUpVM>(); }); IMapper mapper = config.CreateMapper(); ESMJcoUpVM UpdateDto = mapper.Map <ESMJcoORsDetail, ESMJcoUpVM>(emsoffrDtls); return(View(UpdateDto)); } }