public ResultEntity <CityEntity> Create(CityEntity cityEntity) { var validationResult = new ResultEntity <CityEntity>(); using (var cityDA = new CityDA()) { validationResult.Value = cityDA.Create(cityEntity); } return(validationResult); }
public ResultEntity <CityEntity> GetById(int id) { var validationResult = new ResultEntity <CityEntity>(); using (var cityDA = new CityDA()) { validationResult.Value = cityDA.GetById(id); } return(validationResult); }
public ResultEntity <int> GetTotalRows(DBParamEntity dbParamEntity) { var validationResult = new ResultEntity <int>(); using (var cityDA = new CityDA()) { validationResult.Value = cityDA.GetTotalRows(dbParamEntity); } return(validationResult); }
public ResultEntity <IEnumerable <CityEntity> > GetAll(DBParamEntity dbParamEntity) { var validationResult = new ResultEntity <IEnumerable <CityEntity> >(); using (var cityDA = new CityDA()) { validationResult.Value = cityDA.GetAll(dbParamEntity); } return(validationResult); }
public ResultEntity <int> DeleteById(int id) { var validationResult = new ResultEntity <int>(); using (var cityDA = new CityDA()) { var ids = new int[] { id }; validationResult.Value = cityDA.Delete(ids); if (validationResult.Value != 1) { validationResult.Warning.Add("Failed delete record City with ID: " + id); return(validationResult); } } return(validationResult); }
public ResultEntity <CityEntity> Update(CityEntity cityEntity) { var validationResult = new ResultEntity <CityEntity>(); using (var cityDA = new CityDA()) { var resultUpdate = cityDA.Update(cityEntity); if (resultUpdate <= 0) { validationResult.Warning.Add("Failed Updating City!"); return(validationResult); } validationResult.Value = cityEntity; } return(validationResult); }
public CustomerController() { _da = new CustomerDA("#"); _systemCityDa = new CityDA("#"); }
public GoogleMapController() { _googleMapDa = new GoogleMapDA("#"); _systemCityDa = new CityDA("#"); _systemDistrictDa = new DistrictDA("#"); }
/// <summary> /// This Function is used to get list of all the Cities in a particular State from Database. /// </summary> public static List <City> GetAllByState(int stateId) { return(CityDA.GetAllByState(stateId)); }
/// <summary> /// This Function is used to get list of all the Cities from Database. /// </summary> public static List <City> GetAll() { return(CityDA.GetAll()); }
/// <summary> /// This Function is used to get Details of the City from Database. /// </summary> public static City GetDetails(int id) { return(CityDA.GetDetails(id)); }
/// <summary> /// This Function is used to Delete previously added City from database and is performed by SuperAdmin Only. /// </summary> public static bool Delete(City info) { return(CityDA.Delete(info)); }
/// <summary> /// This Function is used to Update previously added City in database and is performed by SuperAdmin Only. /// </summary> public static bool Update(City info) { return(CityDA.Update(info)); }
/// <summary> /// This Function is used to add new City to database and is performed by SuperAdmin Only. /// </summary> public static bool Add(City info) { return(CityDA.Add(info)); }