public bool ExistName(List <UserPostInfo> ClipPad, ref string _msg) { bool _ret = false; _msg = ""; string _fg = ""; if (this.gridView1.RowCount > 0) { for (int i = 0; i < this.gridView1.RowCount; i++) { UserPostInfo _pItem = this.gridView1.GetRow(i) as UserPostInfo; foreach (UserPostInfo _p in ClipPad) { if (_p.PostID == _pItem.PostID) { _ret = true; _msg += _fg; _msg += _p.PostName; _fg = ","; } } } } return(_ret); }
public string AddPostInfo([FromBody] QueryAddPostInfo query) { query.Ssid = query.Ssid.Substring(1, query.Ssid.Length - 2); var json = new UserPostInfo().AddPostInfo(query); return(JsonConvert.SerializeObject(json)); }
public List <UserPostInfo> GetSelectedPosts() { List <UserPostInfo> _ret = new List <UserPostInfo>(); if (this.gridView1.SelectedRowsCount > 0) { int[] _selectedIndexs = this.gridView1.GetSelectedRows(); foreach (int _index in _selectedIndexs) { UserPostInfo _item = this.gridView1.GetRow(_index) as UserPostInfo; _ret.Add(_item); } } return(_ret); }
public string AddClick([FromBody] QueryAddClick query) { var json = new UserPostInfo().AddClick(query); return(JsonConvert.SerializeObject(json)); }
public string GetPostInfo() { var json = new UserPostInfo().GetPostInfo(); return(JsonConvert.SerializeObject(json)); }