private void Del() { string code = HttpContext.Current.Request["id"].ToString(); EventFactory bll = new EventFactory(); HttpContext.Current.Response.Write(bll.Del(code)); }
private void GetMagList() { string sql = ""; int iStart = 0; try { iStart = int.Parse(HttpContext.Current.Request["pageIndex"].ToString()) * int.Parse(HttpContext.Current.Request["pageSize"].ToString()); } catch { } int iLimit = 20; try { iLimit = int.Parse(HttpContext.Current.Request["pageSize"].ToString()); } catch { } string EventDesc = string.Empty; try { EventDesc = HttpUtility.UrlDecode(HttpContext.Current.Request["EventDesc"].ToString()); } catch { } if (!string.IsNullOrEmpty(EventDesc)) { sql += "and EventDesc like '%" + EventDesc + "%' "; } EventFactory bll = new EventFactory(); HttpContext.Current.Response.Write(bll.GetMagList(sql, iStart, iLimit)); }
private void Save() { string json = string.Empty; try { json = HttpContext.Current.Request["json"].ToString(); } catch { } if (string.IsNullOrEmpty(json)) { HttpContext.Current.Response.Write(JsonMessage.FailString("参数丢失!")); return; } if (HttpContext.Current.Session["SYS_USER"] == null) { HttpContext.Current.Response.Write(JsonMessage.FailStringNohaveOther("登录已失效,请重新登录!")); return; } SYS_USER4SESSION user = HttpContext.Current.Session["SYS_USER"] as SYS_USER4SESSION; Sys_UserEvent table = JsonHelper.DeserializeData<Sys_UserEvent>(json); table.EventRecordUserID = user.UserID; EventFactory bll = new EventFactory(); HttpContext.Current.Response.Write(bll.Save(table)); }
private void GetUserList() { EventFactory bll = new EventFactory(); string json = bll.GetUserList(); HttpContext.Current.Response.Write(json); }