Exemple #1
0
 public void CreateModels(Connection conn)
 {
     for (int i = 0; i < Tables.Count(); i++)
     {
         JObject       Datos = JConvert.ToJObject(Tables.Get(i));
         string        Query = "SELECT * FROM V_Tables WHERE [Table] = '" + Datos.Get("Table") + "'";
         SqlDataReader Data  = conn.Exec(Query);
         if (Data.HasRows)
         {
             while (Data.Read())
             {
             }
         }
     }
 }
Exemple #2
0
        public ActionResult ChangeStatusHidenShowComment(int Id, int Status, int postId)
        {
            string getJsonRepons = SendRequest.sendRequestGET(ApiUrl.urlChangeStatusComment + "?Id=" + Id + "&Status=" + Status, null);
            var    objectResult  = JConvert.jsonconvert <ObjectResult <Comment> >(getJsonRepons);

            if (objectResult.code == 200)
            {
                Message.set_flash(objectResult.message.Message, "success");
                return(RedirectToAction("Edit", "Posts", new { @id = postId }));
            }
            else
            {
                Message.set_flash(objectResult.message.Message, "danger");
            }
            return(RedirectToAction("Edit", "Posts", new { @id = postId }));
        }
Exemple #3
0
        public ShowViewModel(IDialogService dialogService)
        {
            db = new ParkingdbContext();

            dbSize = db.Parks.Count();

            Parks = new ObservableCollection <ParkingInfo>();

            Cache     = new Caching <ParkingInfo>();
            CacheList = new ObservableCollection <ParkingInfo>();

            Favorites = JConvert <ObservableCollection <ParkingInfo> > .Deser(ReadWriteFile <ObservableCollection <ParkingInfo> > .Read("Favorites.json", true))
                        ?? new ObservableCollection <ParkingInfo>();

            this.dialogService = dialogService;
        }