protected void Page_Load(object sender, EventArgs e)
        {
            string action = Request["action"];

            switch (action)
            {
            case "create":
                create();
                break;

            case "update":
                obj = Request["obj"];
                ent = JsonHelper.GetObject <SupervisionJianBao>(obj);
                SupervisionJianBao oldEnt = SupervisionJianBao.Find(ent.Id);
                EasyDictionary     dic    = JsonHelper.GetObject <EasyDictionary>(obj);
                ent = DataHelper.MergeData <SupervisionJianBao>(oldEnt, ent, dic.Keys);
                ent.DoUpdate();
                break;

            case "Load":
                string Id = Request["Id"];
                ent = SupervisionJianBao.Find(Id);
                string str = JsonHelper.GetJsonString(ent);
                Response.Write("{success:  true  ,data:" + str + "}");
                Response.End();
                break;

            case "PNameCombo":
                PNameCombo();
                break;
            }
        }
 private void create()
 {
     obj            = Request["obj"];
     ent            = JsonHelper.GetObject <SupervisionJianBao>(obj);
     ent.CreateId   = WebPortalService.CurrentUserInfo.UserID;
     ent.CreateName = WebPortalService.CurrentUserInfo.Name;
     ent.CreateTime = DateTime.Now;
     ent.DoCreate();
 }