public JsonResult GetInfo(string ID)
        {
            var mql2 = TF_ElectronicFileSet.SelectAll().Where(TF_ElectronicFileSet.Id.Equal(ID));
            TF_ElectronicFile Rmodel = OPBiz.GetEntity(mql2);

            //  groupsBiz.Add(rol);
            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult EditInfo(TF_ElectronicFile EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool           IsAdd      = false;

            EidModle.UpdateTime = DateTime.Now;
            if (!(EidModle.Id != null && !EidModle.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                EidModle.Id         = Guid.NewGuid();
                EidModle.CreateMan  = UserData.UserName;
                EidModle.CreateTime = DateTime.Now;
                EidModle.isValid    = true;
                EidModle.isDeleted  = false;
                EidModle.States     = 0;
                try
                {
                    OPBiz.Add(EidModle);

                    ReSultMode.Code = 11;
                    ReSultMode.Data = EidModle.Id.ToString();
                    ReSultMode.Msg  = "添加成功";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "电子文件--新增", true, WebClientIP, "电子文件");
                }
                catch (Exception e)
                {
                    ReSultMode.Code = -11;
                    ReSultMode.Data = e.ToString();
                    ReSultMode.Msg  = "添加失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "电子文件--新增", false, WebClientIP, "电子文件");
                }
            }
            else
            {
                EidModle.WhereExpression = TF_ElectronicFileSet.Id.Equal(EidModle.Id);
                // EidModle.ChangedMap.Remove("id");//移除主键值
                if (OPBiz.Update(EidModle) > 0)
                {
                    ReSultMode.Code = 11;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "修改成功";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "电子文件--修改", true, WebClientIP, "电子文件");
                }
                else
                {
                    ReSultMode.Code = -13;
                    ReSultMode.Data = "";
                    ReSultMode.Msg  = "修改失败";
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "电子文件--修改", false, WebClientIP, "电子文件");
                }
            }


            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }