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

            //  groupsBiz.Add(rol);
            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult AddList(string listAll)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();

            List <TF_PersonnelFile_Borrow> listItem = JsonHelper.JSONToList <TF_PersonnelFile_Borrow>(listAll);

            if (listItem != null && listItem.Count > 0)
            {
                for (int i = 0; i < listItem.Count; i++)
                {
                    TF_PersonnelFile_Borrow EidModle = listItem[i];
                    EidModle.Id          = Guid.NewGuid();
                    EidModle.CreateMan   = UserData.UserName;
                    EidModle.CreateManId = UserData.Id;
                    EidModle.CreateTime  = DateTime.Now;
                    EidModle.isDeleted   = false;
                    EidModle.States      = 0;

                    EidModle.StatesName = "未操作";
                    OPBiz.Add(EidModle);
                }
            }

            try
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = "";
                ReSultMode.Msg  = "成功添加" + listItem.Count + "条";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "档案借用--新增List", true, WebClientIP, "档案借用");
            }
            catch (Exception e)
            {
                ReSultMode.Code = -11;
                ReSultMode.Data = e.ToString();
                ReSultMode.Msg  = "添加失败";
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "档案借用--新增List", false, WebClientIP, "档案借用");
            }



            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
        public JsonResult SumbtEditInfo(TF_PersonnelFile_Borrow EidModle)
        {
            HttpReSultMode ReSultMode = new HttpReSultMode();
            bool           IsAdd      = false;


            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.CreateManId = UserData.Id;
                EidModle.CreateTime  = DateTime.Now;

                EidModle.isDeleted = false;

                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_PersonnelFile_BorrowSet.Id.Equal(EidModle.Id);
                // EidModle.ChangedMap.Remove("id");//移除主键值


                EidModle.BorrowMan = UserData.UserName;

                EidModle.BorrowTime = DateTime.Now.ToString("yyyy-MM-dd");
                EidModle.States     = 1;
                EidModle.StatesName = "已借出";;
                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.修改, "档案借用--已借出修改", true, WebClientIP, "档案借用");
                }
            }


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