public LocationModel(LocationModel source) { Id = source.Id; Location = source.Location; Code = source.Code; Status = source.Status; }
public List <LocationModel> FetchAll() { List <CloneableDictionary <string, string> > table = db.SelectMultiple("select * from location"); foreach (var row in table) { var temp = new LocationModel(); var clone = row.Clone(); temp.Id = Int32.Parse(row["location_id"]); temp.Location = row["location"]; temp.Code = row["code"]; if (row["status"] == "0") { temp.Status = false; } else { temp.Status = true; } _locations.Add(temp); } return(_locations); }
public List<LocationModel> FetchAll() { List<CloneableDictionary<string, string>> table = db.SelectMultiple("select * from location"); foreach (var row in table) { var temp = new LocationModel(); var clone = row.Clone(); temp.Id = Int32.Parse(row["location_id"]); temp.Location = row["location"]; temp.Code = row["code"]; if (row["status"] == "0") temp.Status = false; else temp.Status = true; _locations.Add(temp); } return _locations; }