public JsonResult Index(int AgentId, int ToAgentId, string PnrNo, string BookingStatus, string Remark) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string jsonresponse = _provider.TransferPNRToAgency(AgentId, ToAgentId, PnrNo, BookingStatus, Remark, obj.AppUserId); return(Json(jsonresponse)); }
public ActionResult Create(MasterBranchDealviewModel model) { ValidateMasterBranchDealviewModel(model); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string BranchCode = mDealProvider.GetBranchCodeByBranchId(obj.LoginTypeId); try { if (!ModelState.IsValid) { model.CreatedBy = obj.AppUserId; model.BranchOfficeId = obj.LoginTypeId; model.BranchOfficeCode = BranchCode; if (model.CopyDeal == true) { mDealProvider.CopyDealFromOneToAnotherForMobileBranch(model.DealName, model.DealMasterId, 3, model.BranchOfficeId, model.CreatedBy); } else { mDealProvider.AddDealMaster(model, 3); } return(RedirectToAction("Index", "BranchsDealSetup")); } else { return(RedirectToAction("Index", "BranchsDealSetup")); } } catch { return(RedirectToAction("Index", "BranchsDealSetup")); } }
public ActionResult Edit(int Id, DashboardContentsModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.DasbBoardContentId = Id; model.UpdatedBy = obj.AppUserId; try { if (model.IsPublished == true) { model.IsPublished = false; ser.UpdateIsPublished(Id, model); model.IsPublished = true; ser.EditDashBoardContents(model); } else { ser.EditDashBoardContents(model); } } catch { return(View(model)); } return(RedirectToAction("Index")); }
public RedirectToRouteResult CreateRole(string id, FormCollection fc) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; if (id != "") { if (Roles.RoleExists(id) != true) { ///////// Save Role //////////////// ser.CreateRole(id); ///////// End Saving Role ////////// ////////// Get RoleId for saving in Core_ProductRoles table ///////////// Guid roleid = ser.GetIdbyRolename(id); Core_ProductRoles model = new Core_ProductRoles(); model.RoleId = roleid; model.ProductId = Convert.ToInt32(fc["ProductId"]); model.SubProductId = Convert.ToInt32(fc["SubProductId"]); ser.Save_RoleUserTypeMapping(model); /////////////// End Role Creation //////////// TempData["message"] = "Role Created Successfully"; return(RedirectToAction("ManageRole")); } else { TempData["message"] = " The role " + id + " already exists."; return(RedirectToAction("ManageRole")); } } else { TempData["message"] = "Please Enter Role Name"; return(RedirectToAction("ManageRole")); } }
public ActionResult Index(int?IsActive, string id) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string alphabet = string.IsNullOrEmpty(id) ? "A" : id; var model = _rep.GetAllAgentByPaging().Where(aa => aa.AgentName.StartsWith(alphabet)).ToList(); bool status = IsActive == 1 ? true : false; if (Request.IsAjaxRequest()) { if (IsActive != 0 && id == "") { model = model.Where(aa => aa.AgentStatus == status).ToList(); return(PartialView("AgentListPartial", model)); } else if (IsActive == null && id != "") { return(PartialView("AgentListPartial", model)); } else if (IsActive == 0 && id != "") { return(PartialView("AgentListPartial", model)); } else { // return PartialView("AgentListPartial", model); model = model.Where(aa => aa.AgentStatus == status).ToList(); return(PartialView("AgentListPartial", model)); } } return(View(model)); }
public ActionResult Create(int id, int?FilterDealIdentifierId, string FilterDealIdentifierText, int?FilterAirlineId, int?FilterCurrencyId) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; var airlineInfo = airlineInfoProvider.GetAirLineInfoById(FilterAirlineId ?? 0); BranchDealViewModel viewmodel = new BranchDealViewModel(); viewmodel.AirlineNameList = mDealProvider.GetAllAirlineNameList(); viewmodel.DealMasterList = mDealProvider.GetAllDistributorDealMasterList(1, obj.LoginTypeId); viewmodel.DealMasterId = id; viewmodel.DealMaserText = mDealProvider.GetDistributorDealMasterById(id).DistributorDealName; viewmodel.DealIdentifierId = FilterDealIdentifierId != null ? FilterDealIdentifierId.Value : 0; viewmodel.DealIdentifierText = FilterDealIdentifierText; viewmodel.CurrencyId = FilterCurrencyId != null ? FilterCurrencyId.Value : 0; viewmodel.AirlineId = FilterAirlineId; viewmodel.AirlineName = airlineInfo != null ? airlineInfo.AirlineName : ""; viewmodel.CurrencyList = mDealProvider.GetCurrencyList(); if (Request != null && Request.IsAjaxRequest()) { return(PartialView("CreateDeal", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Index(BranchDealViewModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.MakerId = obj.AppUserId; model.MakerDate = DateTime.Now; model.isVerified = false; model.isDelete = false; mDealProvider.Update_Htl_BranchDeals(model); BranchDealViewModel viewmodel = new BranchDealViewModel() { HotelNameList = hotelDealRepository.GetAllHotelList(), CurrencyList = mDealProvider.GetCurrencyList(), DealMasterList = mDealProvider.GetAllBranchDealMasterList(2, obj.LoginTypeId), DealList = mDealProvider.GetAllDeals(model.DealMasterId, null, null, null) }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("DisplayDealTemplate", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Index(DealViewModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.MakerId = obj.AppUserId; model.MakerDate = DateTime.Now; model.isVerified = false; model.isDelete = false; mDealProvider.Update_Tkt_Deals(model); DealViewModel viewmodel = new DealViewModel() { CurrencyList = mDealProvider.GetCurrencyList().Where(x => x.Value == "1"), DealMasterList = mDealProvider.GetAllDealMasterList(4), DealAppliedOnList = mDealProvider.GetAllDealAppliedOnList(), DealCalculateOnList = mDealProvider.GetAllDealCalculateOnList(), BusOperatorList = mbDealProvider.GetAllBusOperatorList(), BusCategoryList = mbDealProvider.GetAllBusCategoryList(model.BusOperatorId ?? 0), DealIdentifierList = mDealProvider.GetBusDealIdentifiers(mDealProvider.GetDealMasterById(model.DealMasterId).DealTypeId), DealList = mDealProvider.GetAllBusDeals(model.DealMasterId, null, null, null, null) }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("DisplayDealTemplate", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Create(MasterBranchDealviewModel model) { ValidateMasterBranchDealviewModel(model); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string DistributorCode = mDealProvider.GetDistributorCodeByDistributorId(obj.LoginTypeId); try { if (!ModelState.IsValid) { model.CreatedBy = obj.AppUserId; model.BranchOfficeId = obj.LoginTypeId; model.DistributorCode = DistributorCode; mDealProvider.AddDistributorDealMaster(model, 2); return(RedirectToAction("Index", "HotelDistributorDealSetup")); } else { return(RedirectToAction("Index", "HotelDistributorDealSetup")); } } catch { return(RedirectToAction("Index", "HotelBranchDealSetup")); } }
public ActionResult Index(int?page, DateTime?FromDate, DateTime?ToDate) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; AgentCallLogModel model = new AgentCallLogModel(); if (FromDate == null && ToDate == null) { model.FromDate = GeneralRepository.CurrentDateTime().Date; model.ToDate = GeneralRepository.CurrentDateTime().Date.AddHours(23).AddMinutes(59); } else { model.FromDate = FromDate; model.ToDate = ToDate; } int currentPageIndex = page.HasValue ? page.Value : 1; int defaultPageSize = 30; model.AgentCallLogList = ser.ListPhoneCallLogs(model.FromDate, model.ToDate); model.AgentFollowUpCallLogList = ser.ListFollowUpPhoneCallLogs().ToPagedList(currentPageIndex, defaultPageSize); return(View(model)); }
public ActionResult Create(AgentCallLogModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.LoggedBy = obj.AppUserId; string[] callduration = new string[2]; callduration = model.Duration.Split(':'); model.CallDuration = 0; //if (!string.IsNullOrEmpty(callduration[0])) //{ // model.CallDuration += Convert.ToDouble(callduration[0]) * 60; //} if (!string.IsNullOrEmpty(callduration[0])) { model.CallDuration += Convert.ToDouble(callduration[0]); } if (!string.IsNullOrEmpty(callduration[1])) { model.CallDuration += Convert.ToDouble(callduration[1]) / 60; } model.For_ProductList = new SelectList(ser.GetProductType(), "ProductId", "ProductName"); model.On_ServiceProviderList = new SelectList(ser.GetServiceProviderType(), "ServiceProviderId", "ServiceProviderName"); try { ser.CreatePhoneCallLogs(model); } catch { return(View(model)); } return(RedirectToAction("Index")); }
public ActionResult RegisterNewController(RolePrivilageModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; RolePrivilageModel viewModel = new RolePrivilageModel() { ProductList = ser.GetAllProductList(), SubProductList = ser.GetSubProductList(0), GroupNameList = ser.GetSubProductList(0) }; if (!ModelState.IsValid) { if (Request.IsAjaxRequest()) { return(PartialView("ControllerNameSetupPartial", viewModel)); } } else { //if (Request.IsAjaxRequest()) model.SeqNumber = ser.GetAllSequenceNoFromControllerList(model.ControllerName) + 1; // use sequence no last sequence No. + 1 try { ser.ControllerListAdd(model); } catch { TempData["success"] = "ControllerName already exists!"; } } return(RedirectToAction("Create", "PriviledgeSetup")); }
public ActionResult Edit(DistributorManagementModel model, int id) { try { TravelSession sessionObj = AdminSessionStore.GetTravelSession(); model.UpdatedBy = sessionObj.AppUserId; model.DistributorId = id; distributorManagementProvider.EditDistributedManagement(model); model = distributorManagementProvider.GetDistributorsModel(id); TempData["InfoMessage"] = "Distributor Updated Successfully."; return(RedirectToAction("Index")); } catch (Exception ex) { model.Countries = new SelectList(agentManagementProvider.GetCountry(), "CountryId", "CountryName", model.NativeCountryId); model.StatusOption = new SelectList(agentManagementProvider.GetStatus(), "id", "Name", model.Status); model.Zones = new SelectList(agentManagementProvider.GetZoneList(), "ZoneId", "ZoneName", model.ZoneId); model.Districts = new SelectList(agentManagementProvider.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName", model.DistrictId); model.TimeZones = new SelectList(agentManagementProvider.GetTimeZoneList(), "RecordID", "StandardName", model.TimeZoneId); model.BranchOffices = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName", model.BranchOfficeId); TempData["ActionResponse"] = ex.Message; return(View(model)); } }
public ActionResult Edit(int Id) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; LedgerMasterModel model = new LedgerMasterModel(); LedgerMasterModel viewModel = new LedgerMasterModel() { ProductNameList = _pro.GetAllProductList(), AccGroupNameList = _pro.GetAllAccountGroupList(), AccSubGroupNameList = _pro.GetAllAccountSubGroupName(), AccTypeNameList = _pro.GetAllAccountTypeName(), ddlAirLinesList = _pro.GetAllAirlinesName() }; viewModel = _pro.Detail(Id); ViewData["Product Name"] = new SelectList(_pro.GetProductList(), "ProductId", "ProductName"); ViewData["Account Group Name"] = new SelectList(_pro.GetAccountGroupList(), "AccGroupId", "AccGroupName"); ViewData["Account Sub Group Name"] = new SelectList(_pro.GetAccountSubGroupName(), "AccSubGroupId", "AccSubGroupName"); ViewData["Account Type Name"] = new SelectList(_pro.GetAccountTypeName(), "AccTypeId", "AccTypeName"); ViewData["Type Name"] = new SelectList(_pro.GetAllAirlineNameBasedonAccTypeName(viewModel.MapTable, viewModel.DisplayMember, viewModel.ValueMember), "ValueMember", "DisplayMember"); return(View(viewModel)); }
public ActionResult Edit(PromotionalFareModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.PromotionalFareSector.CreatedBy = obj.AppUserId; IssueDomesticTicketsModel viewModel = new IssueDomesticTicketsModel(); try { bool isUpdated = false; isUpdated = promotionalFareProvider.UpdatePromotionalFareSegment(model); if (isUpdated) { TempData["SuccessMessage"] = "Record Updated Successfully!"; } return(RedirectToAction("Index")); } catch (Exception ex) { TempData["ActionResponse"] = ex.Message; return(View(viewModel)); } }
public ActionResult DeleteBusBranchMasterDealForceFully(int id, string name) { JsonResult returnJsonData = new JsonResult(); BranchDealViewModel viewmodel = new BranchDealViewModel(); viewmodel = bDealProvider.GetBusBranchDealDetail(id); BranchDealViewModel masterviewmodel = new BranchDealViewModel(); masterviewmodel = bDealProvider.GetBranchMasterDealDetail(id); try { bDealProvider.Air_DistributorDealChangesLogs(viewmodel); bDealProvider.Air_DistributorDealMasterChangesLogs(masterviewmodel); bool result = false; TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; viewmodel.DealMasterList = bDealProvider.GetAllBranchDealMasterList(4, obj.LoginTypeId); bDealProvider.Delete_Bus_Core_BranchDeals(id, obj.AppUserId); bDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId); result = true; viewmodel.isVerified = result; returnJsonData.Data = viewmodel; return(returnJsonData); } catch (Exception ex) { viewmodel.isVerified = false; returnJsonData.Data = viewmodel; } return(returnJsonData); }
public ActionResult Index(DealViewModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.MakerId = obj.AppUserId; model.MakerDate = DateTime.Now; model.isVerified = false; model.isDelete = false; mDealProvider.Update_Mobile_Deals(model); DealViewModel viewmodel = new DealViewModel() { DealMasterList = mDealProvider.GetAllDealMasterList(3), DealAppliedOnList = mDealProvider.GetAllDealAppliedOnList(), DealCalculateOnList = mDealProvider.GetAllDealCalculateOnList(), DealIdentifierList = mDealProvider.GetMobileDealIdentifiers(mDealProvider.GetDealMasterById(model.DealMasterId).DealTypeId), DealList = mDealProvider.GetAllMobileDeals(model.DealMasterId, null) }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("DisplayDealTemplate", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Index(BranchDealViewModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.MakerId = obj.AppUserId; model.MakerDate = DateTime.Now; model.isVerified = false; model.isDelete = false; mDealProvider.Update_Mobile_DistributorDeals(model); BranchDealViewModel viewmodel = new BranchDealViewModel() { DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId), DealList = mDealProvider.GetAllMobileBranchDeals(model.DealMasterId, null) }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("DisplayDealTemplate", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Index(int?IsActive, string id) { TravelSession obj = SessionStore.GetTravelSession(); string alphabet = string.IsNullOrEmpty(id) ? "" : id; var model = _rep.GetAllAgentByPaging().Where(aa => aa.AgentName.StartsWith(alphabet)).Where(x => x.DistributorId == obj.LoginTypeId).ToList(); //var model = _rep.GetAllAgentByPaging().Where(aa => aa.AgentName.StartsWith(alphabet)).Where(x => x.DistributorId == obj.AgentId).ToList(); bool status = IsActive == 1 ? true : false; if (Request.IsAjaxRequest()) { if (IsActive != 0 && id == "") { model = model.Where(aa => aa.AgentStatus == status).ToList(); return(PartialView("AgentListPartial", model)); } else if (IsActive == null && id != "") { return(PartialView("AgentListPartial", model)); } else if (IsActive == 0 && id != "") { return(PartialView("AgentListPartial", model)); } else { model = model.Where(aa => aa.AgentStatus == status).ToList(); return(PartialView("AgentListPartial", model)); } } return(View(model)); }
public ActionResult Edit(int Id, SpecialFaresModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.SpecialFareId = Id; model.UpdatedBy = obj.AppUserId; if (model.hdfAirlineName == 0) { TempData["ErrorMessage"] = "Please, enter proper airline."; return(View(model)); } else if (model.hdfFromCityId == 0) { TempData["ErrorMessage"] = "Please, enter proper city."; return(View(model)); } else if (model.hdfToCityId == 0) { TempData["ErrorMessage"] = "Please, enter proper city."; return(View(model)); } else { try { ser.EditSpecialFare(model); } catch { return(View(model)); } } return(RedirectToAction("Index")); }
public ActionResult Create(int id, int?FilterDealIdentifierId, string FilterDealIdentifierText, int?FilterHotelId, int?FilterCurrencyId) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; HotelInfoRepository hotelInfoRepository = new HotelInfoRepository(); var hotelInfo = hotelInfoRepository.GetHotelInfoByHotelID(FilterHotelId ?? 0); BranchDealViewModel viewmodel = new BranchDealViewModel(); viewmodel.HotelNameList = hotelDealRepository.GetAllHotelList(); viewmodel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(2, obj.LoginTypeId); viewmodel.DealMasterId = id; viewmodel.DealMaserText = mDealProvider.GetBranchDealMasterById(id).BranchDealName; viewmodel.DealIdentifierId = FilterDealIdentifierId != null ? FilterDealIdentifierId.Value : 0; viewmodel.DealIdentifierText = FilterDealIdentifierText; viewmodel.CurrencyId = FilterCurrencyId != null ? FilterCurrencyId.Value : 0; viewmodel.HotelId = FilterHotelId; viewmodel.AirlineName = hotelInfo != null ? hotelInfo.HotelName : string.Empty; viewmodel.CurrencyList = mDealProvider.GetCurrencyList(); if (Request != null && Request.IsAjaxRequest()) { return(PartialView("CreateDeal", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Create(int id, int?FilterBusOperatorId, int?FilterBusCategoryId) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; BranchDealViewModel viewmodel = new BranchDealViewModel(); viewmodel.BusOperatorList = mDealProvider.GetAllBusOperatorList(); viewmodel.BusCategoryList = mDealProvider.GetAllBusCategoryList(FilterBusOperatorId ?? 0); viewmodel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(4, obj.LoginTypeId); viewmodel.DealMasterId = id; viewmodel.DealMaserText = mDealProvider.GetBranchDealMasterById(id).BranchDealName; viewmodel.BusOperatorId = FilterBusOperatorId; viewmodel.BusCategoryId = FilterBusCategoryId; viewmodel.BusOperatorName = mDealProvider.GetBusOperatorById(FilterBusCategoryId ?? 0); viewmodel.BusCategoryName = mDealProvider.GetBusCategoryById(FilterBusCategoryId ?? 0); viewmodel.CurrencyList = mDealProvider.GetCurrencyList(); if (Request != null && Request.IsAjaxRequest()) { return(PartialView("CreateDeal", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult ManageRole(int?pageNo, int?flag) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; ViewData["ProductList"] = new SelectList(ser.GetProductList(), "ProductId", "ProductName"); ////Product List in dropdown ViewData["SubProductList"] = new SelectList("", "SubProductId", "SubProductName"); /////////////////End role here///////////////////////////////////// ////////////// Paging Data ////////////////////////////////////////// int currentPageNo = 0; int numberOfPage = 0; if (pageNo == null) { pageNo = 1; } ////////////// End of Paging Data //////////////////////////////// //////////// Showing Role logig start here ////////////////////// var model = new List <RoleBasedRoleModel>(); model = ser.GetAllRoleForAdminByByPaging(pageNo.Value, out currentPageNo, out numberOfPage, flag).ToList(); //////////// End of Showing Role logic ////////////////// if (Request.IsAjaxRequest()) { ViewData["TotalPages"] = numberOfPage; ViewData["CurrentPage"] = currentPageNo; return(PartialView("RolePartial", model)); } ViewData["TotalPages"] = numberOfPage; ViewData["CurrentPage"] = currentPageNo; return(View(model)); }
public ActionResult Create() { BranchOfficeManagementModel model = new BranchOfficeManagementModel(); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; try { model.NativeCountryList = new SelectList(_repAgManagement.GetCountry(), "CountryId", "CountryName", 0); model.StatusList = new SelectList(_repAgManagement.GetStatus(), "id", "Name", 1); model.ZoneList = new SelectList(_repAgManagement.GetZoneList(), "ZoneId", "ZoneName"); model.DistrictList = new SelectList(_repAgManagement.GetDistrictListbyZoneId(1), "DistrictId", "DistrictName"); model.TimeZoneList = new SelectList(_repAgManagement.GetTimeZoneList(), "RecordID", "StandardName", 66); model.MasterDealNameListOfAirlines = provider.GetBranchAllDealListOfAirlines(); model.MasterDealNameListOfHotels = provider.GetAllDealListOfHotel(); model.MasterDealNameListOfBus = provider.GetAllDealListOfBus(); model.MasterDealNameListOfMobile = provider.GetAllDealListOfMobile(); ViewData["branchClass"] = new SelectList(provider.GetBranchClass(), "BranchClassId", "BranchClassName"); model.BranchClassId = provider.GeBranchClass(obj.LoginTypeId); } catch (Exception ex) { TempData["ActionResponse"] = ex.Message; } return(View(model)); }
public ActionResult Create(MasterBranchDealviewModel model) { ValidateMasterDistributorDealviewModel(model); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string DistributorCode = mDealProvider.GetDistributorCodeByDistributorId(obj.LoginTypeId); try { if (!ModelState.IsValid) { model.CreatedBy = obj.AppUserId; model.BranchOfficeId = obj.LoginTypeId; model.DistributorCode = DistributorCode; mDealProvider.AddDistributorDealMaster(model, 1); if (model.CopyDeal == true) { mDealProvider.CopyDealfromOneToAnotherfordistributor(model.DealName, model.DealMasterId, 1, model.BranchOfficeId, model.CreatedBy); } return(RedirectToAction("Index", "DistributorDealSetup")); } else { return(RedirectToAction("Index", "DistributorDealSetup")); } } catch { return(RedirectToAction("Index", "DistributorDealSetup")); } }
public ActionResult Index(HotelDealViewModel model) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; model.MakerId = obj.AppUserId; model.MakerDate = DateTime.Now; model.isVerified = false; hotelDealRepository.Update_Htl_Deals(model); HotelDealViewModel viewmodel = new HotelDealViewModel() { CurrencyList = masterDealProvider.GetCurrencyList().Where(x => x.Value == "1"), HotelList = hotelDealRepository.GetAllHotelList(), DealMasterList = mDealProvider.GetAllDealMasterList(2), DealIdentifierList = hotelDealRepository.GetDealIdentifiers(hotelDealRepository.GetDealMasterById(model.DealMasterId, 2).DealTypeId), DealList = hotelDealRepository.GetAllDeals(model.DealMasterId, null, null, null, null, null, null) }; if (Request != null && Request.IsAjaxRequest()) { return(PartialView("DisplayDealTemplate", viewmodel)); } else { return(View(viewmodel)); } }
public ActionResult Delete(int id, string name) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; JsonResult returnJsonData = new JsonResult(); BranchDealViewModel viewmodel = new BranchDealViewModel(); try { bool result = false; result = mDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId); viewmodel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId); result = true; viewmodel.isVerified = result; returnJsonData.Data = viewmodel; return(returnJsonData); } catch (Exception ex) { viewmodel.isVerified = false; returnJsonData.Data = viewmodel; } return(returnJsonData); }
public ActionResult Create(RolePrivilageModel model, FormCollection frmColl) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; Guid roleid = Guid.Parse(frmColl["Roleid"]); //////////////collect roleprivilage if any for deleting ///////////// ser.DeleteAlreadyAddedPrivilageBaseonRole(roleid); char separatorChar = Convert.ToChar("_"); List <int> PrivilegeIds = new List <int>(); PrivilegeIds = new List <int>(); foreach (string item in frmColl) { string str = ""; if (item.Contains("checkbox")) { string[] arrayCheckBox = item.Split(separatorChar); PrivilegeIds.Add(Convert.ToInt32(arrayCheckBox[3])); } } AddRolePrivilageMapping(PrivilegeIds, roleid); string Role = ser.Rolename(roleid); return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; MEcCLP.Delete(id, obj.AppUserId); return(RedirectToAction("Index")); }
public ActionResult Edit(CreditLimitModel model, int id) { TravelSession ts = (TravelSession)Session["TravelPortalSessionInfo"]; CreditLimitModel m = new CreditLimitModel(); // model.ddlTypeId = 2; m = ser.GetCreditLimit(id); model.CheckerId = ts.AppUserId; if (m != null) { model.hdfbank = model.ddlBankId; model.hdfEffectiveFrom = model.FromDate; model.hdfExpireOn = model.ToDate; } int chkduplicate = ser.CheckDuplicateRowForAdmin(); if (chkduplicate != 0) { model.AgentCreditLimitId = id; ser.CreditLimitEdit(model); return(RedirectToAction("Index")); } else { ser.CreditLimitAdd(model); return(RedirectToAction("Index")); } }