private void Create() { obj = Request["obj"]; ent = JsonHelper.GetObject <SupervisionRiZhi>(obj); ent.CreateId = WebPortalService.CurrentUserInfo.UserID; ent.CreateName = WebPortalService.CurrentUserInfo.Name; ent.CreateTime = DateTime.Now; ent.DoCreate(); }
private void Update() { obj = Request["obj"]; ent = JsonHelper.GetObject <SupervisionRiZhi>(obj); SupervisionRiZhi oldEnt = SupervisionRiZhi.Find(ent.Id); EasyDictionary dic = JsonHelper.GetObject <EasyDictionary>(obj); ent = DataHelper.MergeData <SupervisionRiZhi>(oldEnt, ent, dic.Keys); ent.DoUpdate(); }
private void delete() { string ids = Request["ids"]; string[] idArray = ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < idArray.Length; i++) { SupervisionRiZhi.DeleteAll("Id='" + idArray[i] + "'");//删除数据 } }
private void Select() { string Id = Request["Id"]; ent = SupervisionRiZhi.Find(Id); string str = JsonHelper.GetJsonString(ent); string json = "{success: true ,data:" + str + "}"; Response.Write(json); Response.End(); }