示例#1
0
        /// <summary>
        /// //添加转出单位
        /// </summary>
        /// <param name="btnId"></param>
        /// <param name="ManuId"></param>
        /// <returns></returns>
        public JsonResult AddUnitsOut(string UnitsId, string PersonnelFileId)
        {
            HttpReSultMode             ReSultMode = new HttpReSultMode();
            var                        mql2       = TF_PersonnelFile_Units_OutSet.SelectAll().Where(TF_PersonnelFile_Units_OutSet.UnitsId.Equal(UnitsId).And(TF_PersonnelFile_Units_OutSet.PersonnelFileId.Equal(PersonnelFileId)));
            TF_PersonnelFile_Units_Out item       = outOPBiz.GetEntity(mql2);

            if (item != null)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = "";
                ReSultMode.Msg  = "添加转出单位成功";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            item                 = new TF_PersonnelFile_Units_Out();
            item.Id              = Guid.NewGuid();
            item.UnitsId         = Guid.Parse(UnitsId);
            item.PersonnelFileId = Guid.Parse(PersonnelFileId);
            inOPBiz.Add(item);
            ReSultMode.Code = 11;
            ReSultMode.Data = item.Id.ToString();;
            ReSultMode.Msg  = "添加转出单位成功";
            SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.分配转出单位, "人员档案库--分配转出单位", true, WebClientIP, "人员档案库");

            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }
        /// <summary>
        /// //添加转出单位
        /// </summary>
        /// <param name="btnId"></param>
        /// <param name="ManuId"></param>
        /// <returns></returns>
        public JsonResult AddUnitsOut(string UnitsId, string PersonnelFileId)
        {
            HttpReSultMode             ReSultMode = new HttpReSultMode();
            var                        mql2       = TF_PersonnelFile_Units_OutSet.SelectAll().Where(TF_PersonnelFile_Units_OutSet.UnitsId.Equal(UnitsId).And(TF_PersonnelFile_Units_OutSet.PersonnelFileId.Equal(PersonnelFileId)));
            TF_PersonnelFile_Units_Out item       = outOPBiz.GetEntity(mql2);

            if (item != null)
            {
                ReSultMode.Code = 11;
                ReSultMode.Data = "";
                ReSultMode.Msg  = "添加转出单位成功";
                return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
            }
            item                 = new TF_PersonnelFile_Units_Out();
            item.Id              = Guid.NewGuid();
            item.UnitsId         = Guid.Parse(UnitsId);
            item.PersonnelFileId = Guid.Parse(PersonnelFileId);
            inOPBiz.Add(item);
            ReSultMode.Code = 11;
            ReSultMode.Data = item.Id.ToString();;
            ReSultMode.Msg  = "添加转出单位成功";
            return(Json(ReSultMode, JsonRequestBehavior.AllowGet));
        }