Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
        public void OverDate()
        {
            ProjectService projectService = new ProjectService();

            projectService.OverDate();
        }
Ejemplo n.º 3
0
        public List <Project> RetuenMoney(int Userid)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.RetuenMoney(Userid));
        }
Ejemplo n.º 4
0
        public List <Project> GetProjectUserSupport(int UserId)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.GetProjectUserSupport(UserId));
        }
Ejemplo n.º 5
0
        public List <Project> GetProjectUserLaunch(int UserId)
        {
            ProjectService projectService = new ProjectService();

            return(projectService.GetProjectUserLaunch(UserId));
        }
Ejemplo n.º 6
0
        public static string FindByID(string id)
        {
            int newID = Convert.ToInt32(id);

            return(ProjectService.findByID(newID));
        }
Ejemplo n.º 7
0
 public static List <int> FindByNameArr(string name)
 {
     return(ProjectService.FindByNameArr(name));
 }
Ejemplo n.º 8
0
 public static List <ProjectInfo> fingAll()
 {
     return(ProjectService.fingAll());
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 检查是否重复
 /// </summary>
 /// <param name="Model.Project"></param>
 /// <returns></returns>
 public static bool CheckRepeat(Model.Project model)
 {
     return(ProjectService.CheckRepeat(model));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 删除项目
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public static bool DeleteProjectByIds(string ids, out string errMsg)
 {
     return(ProjectService.DeleteProjectByIds(ids, out errMsg));
 }
Ejemplo n.º 11
0
 /// <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));
 }
Ejemplo n.º 12
0
 /// <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));
 }