Esempio n. 1
0
 public void UpdateUser(UserRegistration item)
 {
     _db.Execute("update UserRegistration set UserName='******', PhoneNumber='" + item.PhoneNumber + "', EmailId='" + item.EmailId + "', Password='******', CreatedDate='" + item.CreatedDate + "', ModifiedDate='" + item.ModifiedDate + "' where UserId=" + item.UserId);
 }
Esempio n. 2
0
        /*----- Restaurant Manage
         * public void AddRestaurant(Restaurant item)
         * {
         *      _db.Execute("insert into tracked_flights values(" + item.flightId + ",'" + item.airlineName + "'," + item.flightNumber + ",'" + item.airlineImageURL
         + "','" + item.departureTime + "', '" + item.departureSTime + "','" + item.departureETime
         + "','" + item.arrivalTime + "','" + item.arrivalSTime + "','" + item.arrivalETime
         + "','" + item.trackedTime + "','" + item.status + "'," + item.isActive + "," + item.isArrival + "," + item.lat + "," + item.lon + ");");
         +
         + }
         +
         + public void DeleteRestaurant(int flightId)
         + {
         +      _db.Execute("delete from tracked_flights where flightId=?", flightId);
         + }
         + public void UpdateRestaurant(Restaurant item)
         + {
         +      _db.Execute("update tracked_flights set airlineName='" + item.airlineName + "', airlineImageURL='" + item.airlineImageURL
         + "', departureTime='" + item.departureTime + "', departureSTime='" + item.departureSTime + "', departureETime='" + item.departureETime
         + "', arrivalTime='" + item.arrivalTime + "', arrivalSTime='" + item.arrivalSTime + "', arrivalETime='" + item.arrivalETime
         + "', trackedTime='" + item.trackedTime + "',status='" + item.status + "', isActive=" + item.isActive + ", isArrival=" + item.isArrival
         + ", lat=" + item.lat + ", lon=" + item.lon + " where flightId=" + item.flightId);
         + }
         +
         + public IEnumerable<Restaurant> GetRestaurants()
         + {
         +      return _db.Query<Restaurant>("select * from tracked_flights where 1");
         + }
         +
         + public Restaurant GetRestaurant(string id)
         + {
         +      var result = _db.Query<Restaurant>("select * from tracked_flights where flightId=?", id);
         +      if (result.Count > 0)
         +              return result.First();
         +      else
         +              return null;
         + } -----*/

        /*----- User Manage -----*/
        public void AddUser(UserRegistration item)
        {
            _db.Execute("insert into UserRegistration values(" + item.UserId + ",'" + item.UserName + "'," + item.PhoneNumber + ",'" + item.EmailId
                        + "','" + item.Password + "', '" + item.CreatedDate + "','" + item.ModifiedDate
                        + "');");
        }