public BankBranchModel() { BranchAddress = new AddressDto(); BranchContactNos = new List <ContactDetailsDto>(); BranchContactNos.Add( new ContactDetailsDto() { ContactNoType = Common.ContactType.MobileNo, ContactNo = "", STDCode = "020", CountryCallingCode = "+91" } ); BranchOfBank = new BankDto(); WeeklyOffDay = new WeeklyOffDaysDto(); WeeklyHalfDay = new WeeklyHalfDayDto(); FullDayTimeFrom = new TimeSpan(9, 0, 0); FullDayTimeTo = new TimeSpan(6, 30, 0); FullDayBreakFrom = new TimeSpan(12, 30, 0); FullDayBreakTo = new TimeSpan(13, 15, 0); HalfDayTimeFrom = new TimeSpan(9, 0, 0); HalfDayTimeTo = new TimeSpan(16, 0, 0); HalfDayBreakFrom = new TimeSpan(12, 30, 0); HalfDayBreakTo = new TimeSpan(13, 15, 0); StateDistrictPlacesControlNames = new StateDistrictCityControlNamesModel(""); StateDistrictPlacesControlNames.LeftLabelsClassName = "width80"; }
public ActionResult AddNewCity() { CityVillageServiceReference.ICityVillageService client = new CityVillageServiceClient(); DistrictServiceReference.IDistrictService dclient = new DistrictServiceClient(); UserDto currentUserDto = (UserDto)Session[Constants.SKCURRENTUSER]; CityVillageDto cityVillageDto = new CityVillageDto(); cityVillageDto.Name = Request.Params["ppPlace"].ToString(); cityVillageDto.STDCode = Request.Params["ppSTDCode"].ToString(); if (string.Equals(Request.Params["ppCityVillage"].ToString(), "City")) { cityVillageDto.CityOrVillage = CityVillageType.City; } else { cityVillageDto.CityOrVillage = CityVillageType.Village; } int DistrictId = Convert.ToInt32(Request.Params["ppdistrictId"]); cityVillageDto.DistrictOfCityVillage = dclient.GetById(DistrictId); cityVillageDto = client.Create(cityVillageDto, currentUserDto.UserName); if (cityVillageDto.Response.HasWarning) { ViewData["Error"] = ErrorAndValidationMessages.BRCityVillageNameValidation; } else { TempData["StateSaved"] = "City / Village Saved"; } string controlPrefix = Request.Params["CommonControlPrefix"]; Cams.Web.MVCRazor.Models.Shared.StateDistrictCityControlNamesModel model = new Cams.Web.MVCRazor.Models.Shared.StateDistrictCityControlNamesModel(controlPrefix); model.HiddenFieldForCityVillageValue = cityVillageDto.CityVillageId; model.HiddenFieldForDistrictValue = cityVillageDto.DistrictOfCityVillage.DistrictId; return(PartialView("CallBackPopupAddCity", model)); }