コード例 #1
0
 /// <summary>
 /// 获取考生信息
 /// </summary>
 /// <param name="testPlanId"></param>
 /// <param name="testManId"></param>
 /// <param name="userType"></param>
 /// <param name="identityCard"></param>
 /// <returns></returns>
 public static Model.TestRecordItem getTestRecordInfo(string testPlanId, string testManId, string userType, string identityCard)
 {
     using (Model.SUBHSSEDB db = new Model.SUBHSSEDB(Funs.ConnString))
     {
         Model.TestRecordItem newTestRecord = new Model.TestRecordItem();
         var getTestPlan = db.Test_TestPlan.FirstOrDefault(x => x.TestPlanId == testPlanId);
         if (getTestPlan != null)
         {
             newTestRecord.TestPlanName      = getTestPlan.PlanName;
             newTestRecord.TestPlanId        = testPlanId;
             newTestRecord.TestPlanStartTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getTestPlan.TestStartTime);
             newTestRecord.TestPlanEndTime   = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getTestPlan.TestEndTime);
             newTestRecord.TestManId         = testManId;
             newTestRecord.UserType          = userType;
             var getUpdateTestRecord = db.Test_TestRecord.FirstOrDefault(x => x.TestPlanId == testPlanId && x.IdentityCard == identityCard);
             if (getUpdateTestRecord == null && userType != "2")
             {
                 getUpdateTestRecord = db.Test_TestRecord.FirstOrDefault(x => x.TestPlanId == testPlanId && x.TestManId == testManId);
             }
             if (getUpdateTestRecord != null)
             {
                 newTestRecord.TestRecordId = getUpdateTestRecord.TestRecordId;
                 newTestRecord.DepartId     = getUpdateTestRecord.DepartId;
                 newTestRecord.UnitId       = getUpdateTestRecord.UnitId;
                 newTestRecord.ProjectId    = getUpdateTestRecord.ProjectId;
                 newTestRecord.TestManName  = getUpdateTestRecord.TestManName;
                 newTestRecord.Telephone    = getUpdateTestRecord.Telephone;
                 newTestRecord.IdentityCard = getUpdateTestRecord.IdentityCard;
                 newTestRecord.TestScores   = getUpdateTestRecord.TestScores ?? 0;
             }
             else
             {
                 if (userType == "1")
                 {
                     var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == testManId);
                     if (getUser != null)
                     {
                         newTestRecord.TestManName  = getUser.UserName;
                         newTestRecord.UnitId       = getUser.UnitId;
                         newTestRecord.DepartId     = getUser.DepartId;
                         newTestRecord.IdentityCard = getUser.IdentityCard;
                         newTestRecord.Telephone    = getUser.Telephone;
                     }
                 }
                 else if (userType == "3")
                 {
                     var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == testManId);
                     if (getPerson != null)
                     {
                         newTestRecord.TestManName  = getPerson.PersonName;
                         newTestRecord.ProjectId    = getPerson.ProjectId;
                         newTestRecord.UnitId       = getPerson.UnitId;
                         newTestRecord.WorkPostId   = getPerson.WorkPostId;
                         newTestRecord.IdentityCard = getPerson.IdentityCard;
                         newTestRecord.Telephone    = getPerson.Telephone;
                     }
                 }
                 else
                 {
                     newTestRecord.UnitId = newTestRecord.UnitId = CommonService.GetIsThisUnitId();
                 }
             }
             newTestRecord.DepartName  = DepartService.getDepartNameById(newTestRecord.DepartId);
             newTestRecord.UnitName    = UnitService.GetUnitNameByUnitId(newTestRecord.UnitId);
             newTestRecord.ProjectName = ProjectService.GetProjectNameByProjectId(newTestRecord.ProjectId);
             newTestRecord.IsThiUnit   = CommonService.GetIsThisUnit(newTestRecord.UnitId);
         }
         return(newTestRecord);
     }
 }
コード例 #2
0
        public void OverDate()
        {
            ProjectService projectService = new ProjectService();

            projectService.OverDate();
        }
コード例 #3
0
        public List <Project> RetuenMoney(int Userid)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.RetuenMoney(Userid));
        }
コード例 #4
0
        public List <Project> GetProjectUserSupport(int UserId)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.GetProjectUserSupport(UserId));
        }
コード例 #5
0
        public List <Project> GetProjectUserLaunch(int UserId)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.GetProjectUserLaunch(UserId));
        }
コード例 #6
0
        public static string FindByID(string id)
        {
            int newID = Convert.ToInt32(id);

            return(ProjectService.findByID(newID));
        }
コード例 #7
0
 public static List <int> FindByNameArr(string name)
 {
     return(ProjectService.FindByNameArr(name));
 }
コード例 #8
0
 public static List <ProjectInfo> fingAll()
 {
     return(ProjectService.fingAll());
 }
コード例 #9
0
ファイル: ProjectManager.cs プロジェクト: lianghuiyin/htps
 /// <summary>
 /// 检查是否重复
 /// </summary>
 /// <param name="Model.Project"></param>
 /// <returns></returns>
 public static bool CheckRepeat(Model.Project model)
 {
     return(ProjectService.CheckRepeat(model));
 }
コード例 #10
0
ファイル: ProjectManager.cs プロジェクト: lianghuiyin/htps
 /// <summary>
 /// 删除项目
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public static bool DeleteProjectByIds(string ids, out string errMsg)
 {
     return(ProjectService.DeleteProjectByIds(ids, out errMsg));
 }
コード例 #11
0
ファイル: ProjectManager.cs プロジェクト: lianghuiyin/htps
 /// <summary>
 /// 根据id修改项目
 /// </summary>
 /// <param name="Model.Project"></param>
 /// <returns></returns>
 public static bool ModifyProjectById(ref Model.Project model, out string errMsg)
 {
     return(ProjectService.ModifyProjectById(ref model, out errMsg));
 }
コード例 #12
0
ファイル: ProjectManager.cs プロジェクト: lianghuiyin/htps
 /// <summary>
 /// 添加项目
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool AddProject(ref Model.Project model, out string errMsg)
 {
     return(ProjectService.AddProject(ref model, out errMsg));
 }