protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["NationalityId"] != null) { if (!IsPostBack) { NationalityEntity entity = new NationalityMapper().Get(new NationalityEntity() { Id = Convert.ToInt32(Request.QueryString["NationalityId"]) }); if (entity != null) { TitleTextBox.Text = entity.Title; OtherInfoTextBox.Text = entity.Description; } else { Response.Redirect("List.aspx"); } } } else { Response.Redirect("List.aspx"); } }
public ComboStoreService(IDatabaseContext databaseContext, CustomerTypeMapper customerTypeMapper , NationalityMapper nationalityMapper, CustomerStatusMapper customerStatusMapper , CemeteryAreasMapper cemeteryAreasMapper, CemeteryRowsMapper cemeteryRowsMapper , CemeteryColumnsMapper cemeteryColumnsMapper, SecurityLevelMapper securityLevelMapper , ServiceLevelMapper serviceLevelMapper, TombstoneTypeMapper tombstoneTypeMapper , PaymentStatusMapper paymentStatusMapper, IDepartmentMapper departmentMapper , RoleMapper roleMapper) { _databaseContext = databaseContext; _customerTypeMapper = customerTypeMapper; _nationalityMapper = nationalityMapper; _customerStatusMapper = customerStatusMapper; _cemeteryAreasMapper = cemeteryAreasMapper; _cemeteryRowsMapper = cemeteryRowsMapper; _cemeteryColumnsMapper = cemeteryColumnsMapper; _securityLevelMapper = securityLevelMapper; _serviceLevelMapper = serviceLevelMapper; _tombstoneTypeMapper = tombstoneTypeMapper; _paymentStatusMapper = paymentStatusMapper; _departmentMapper = departmentMapper; _roleMapper = roleMapper; }
public CascadingDropDownNameValue[] GetNationalities(string knownCategoryValues, string category, string contextKey) { List <CascadingDropDownNameValue> values = new List <CascadingDropDownNameValue>(); List <NationalityEntity> list = new NationalityMapper().List(""); foreach (NationalityEntity ent in list) { CascadingDropDownNameValue cdnv; if (ent.Title == contextKey) { cdnv = new CascadingDropDownNameValue(ent.Title, ent.Id.ToString(), true); } else { cdnv = new CascadingDropDownNameValue(ent.Title, ent.Id.ToString()); } values.Add(cdnv); } return(values.ToArray()); }