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()) { } } } }
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 })); }
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; }