示例#1
0
 public LocationModel(LocationModel source)
 {
     Id = source.Id;
     Location = source.Location;
     Code = source.Code;
     Status = source.Status;
 }
示例#2
0
        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);
        }
示例#3
0
        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;
        }