public void Fill() { DataTable dataTable = City_DAL.GetDataTable(); City city = new City(); DataRow dataRow; for (int i = 0; i < dataTable.Rows.Count; i++) { dataRow = dataTable.Rows[i]; city = new City(dataRow); this.Add(city); } }
public Guid InsertUpdateRecord(City objCity) { Guid objReturn = new Guid(); try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.InsertUpdateRecord(objCity); } } catch (Exception ex) { log.Error("InsertUpdateRecord Error: ", ex); } return(objReturn); }
public City Validate(string email, string password) { City objReturn = null; try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.Validate(email, password); } } catch (Exception ex) { log.Error("Validate Error: ", ex); } return(objReturn); }
public City GetRecordById(Guid iId) { City objReturn = null; try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.GetRecordById(iId); } } catch (Exception ex) { log.Error("GetRecordById Error: ", ex); } return(objReturn); }
public CityPage GetRecordPage(int iPageNo, int iPageSize) { CityPage objReturn = new CityPage(); try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.GetRecordPage(iPageNo, iPageSize); } } catch (Exception ex) { log.Error("GetRecordPage Error: ", ex); } return(objReturn); }
public List <City> GetAllRecord() { List <City> objReturn = null; try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.GetAllRecord(); } } catch (Exception ex) { log.Error("GetAllRecord Error: ", ex); } return(objReturn); }
public bool DeleteRecord(int iId) { bool objReturn = false; try { using (City_DAL objDAL = new City_DAL()) { objReturn = objDAL.DeleteRecord(iId); } } catch (Exception ex) { log.Error("DeleteRecord Error: ", ex); } return(objReturn); }
public void Fill() { //להביא מה-DAL טבלה מלאה בכל הלקוחות DataTable dataTable = City_DAL.GetDataTable(); //להעביר את הערכים מהטבלה לתוך אוסף הלקוחות //להעביר כל שורה בטבלה ללקוח DataRow dataRow; City city; for (int i = 0; i < dataTable.Rows.Count; i++) { dataRow = dataTable.Rows[i]; city = new City(dataRow); this.Add(city); } }