public void Update(Role role) { try { List <View> list = new List <View>(); list = role.ViewsPerRole; VCrud.DelteRolexView(role); CrudFactory.Update(role); var valueList = new ValueListSelect { IdList = "Role", Value = role.IdRole.ToString(), Description = role.Name }; VLCrud.Update(valueList); foreach (View RolxV in list) { CrudFactory.CreateRolexView(RolxV, role); } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
public void Create(Location location) { try { if (!String.IsNullOrEmpty(location.Name)) { var loc = CrudFactory.CreateLocation(location); var valueList = new ValueListSelect { IdList = "Location", Value = loc.IdLocation.ToString(), Description = loc.Name }; VLCrud.Create(valueList); } else { throw new BusinessException(24); } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
public void CreateFineType(FineType fineType) { try { if (!String.IsNullOrEmpty(fineType.TypeName)) { ValidateFineTypeFields(fineType); var fineT = CrudFactory.CreateFineType(fineType); var valueList = new ValueListSelect { IdList = "FineType", Value = fineT.IdType.ToString(), Description = fineT.TypeDescription }; VLCrud.Create(valueList); } else { throw new BusinessException(53); } } catch (Exception bex) { ExceptionManager.GetInstance().Process(bex); } }
public void Create(Role role) { try { if (!String.IsNullOrEmpty(role.Name)) { var rol = CrudFactory.CreateRole(role); var valueList = new ValueListSelect { IdList = "Role", Value = rol.IdRole.ToString(), Description = rol.Name }; VLCrud.Create(valueList); foreach (View RolxV in role.ViewsPerRole) { CrudFactory.CreateRolexView(RolxV, role); } } else { throw new BusinessException(53); } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
public BaseEntity BuildObject(Dictionary <string, object> row) { var Select = new ValueListSelect { IdList = GetStringValue(row, IDSELECT), Value = GetStringValue(row, VALUE), Description = GetStringValue(row, DESCRPTION) }; return(Select); }
public void Delete(Location location) { CrudFactory.Delete(location); var valueList = new ValueListSelect { IdList = "Location", Value = location.IdLocation.ToString(), Description = location.Name }; VLCrud.Delete(valueList); }
public void UpdateFinesSettings(FineType fineType) { try { CrudFactory.UpdateFinesSettings(fineType); var valueList = new ValueListSelect { IdList = "FineType", Value = fineType.IdType.ToString(), Description = fineType.TypeName }; VLCrud.Update(valueList); } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
public static HtmlString CtrlCheckBoxList(this HtmlHelper html, string idList, string labelName, string columnDataName = "", string viewname = "") { ValueListManager Select = new ValueListManager(); var buscarSelect = new ValueListSelect { IdList = idList }; var options = Select.GetValuesList(buscarSelect); var checkList = new CtrlCheckBoxList { Id = idList, Label = labelName, List = options, ViewName = viewname, ColumnDataName = columnDataName }; return(new HtmlString(checkList.GetHtml())); }
public void Update(Location location) { Location be = null; try { be = CrudFactory.Retrieve <Location>(location); if (be != null) { if (!String.IsNullOrEmpty(location.Name)) { CrudFactory.Update(location); var valueList = new ValueListSelect { IdList = "Location", Value = location.IdLocation.ToString(), Description = location.Name }; VLCrud.Update(valueList); } else { // Location Name is required. throw new BusinessException(24); } } else { // Location Not Found. throw new BusinessException(23); } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } }
public List <ValueListSelect> GetValuesList(ValueListSelect idList) { return(CrudFactory.RetrieveSelect <ValueListSelect>(idList)); }