Beispiel #1
0
        public string Add()
        {
            var telegraphSendDate =  ConvertUtil.ConvertStringToNullableDateTime(Request["TelegraphSendDate"]);
            var telegraphReceiveDate = ConvertUtil.ConvertStringToNullableDateTime(Request["TelegraphReceiveDate"]);
            var telegraphNO = Request["TelegraphNO"];
            var telegraphName = Request["TelegraphName"];
            var trainPostion = Request["TrainPostion"];
            var trainType = Request["TrainType"];
            var className = Request["ClassName"];
            var classBeginDate = ConvertUtil.ConvertStringToNullableDateTime(Request["ClassBeginDate"]);
            var classEndDate = ConvertUtil.ConvertStringToNullableDateTime(Request["ClassEndDate"]);
            var classTeacher = Request["ClassTeacher"];
            var classRoom = Request["ClassRoom"];
            var stuID = Request["StuID"];
            var stuName = Request["StuName"];
            var sex = Request["Sex"];
            var railwayOffice = Request["RailwayOffice"];
            var station = Request["Station"];
            var iDCardNO = Request["IDCardNO"];
            var workID = Request["WorkID"];
            var telephoneNO = Request["TelephoneNO"];
            var examineProject = Request["ExamineProject"];
            var examineDate =  ConvertUtil.ConvertStringToNullableDateTime(Request["ExamineDate"]);
            var invigilator = Request["Invigilator"];
            var p1ExamineProjectID = Request["P1ExamineProjectID"];
            var p1ExamineProjectName =Request["P1ExamineProjectName"];
            var p1ExamineStartTime = Request["P1ExamineStartTime"];
            var p1ExamineEndTime = Request["P1ExamineEndTime"];
            var p1AssessorOne = Request["P1AssessorOne"];
            var p1AssessorTwo = Request["P1AssessorTwo"];
            var p1ExamineTimeOffset = Request["P1ExamineTimeOffset"];
            var p1Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P1Score"]);
            var p2ExamineProjectID = Request["P2ExamineProjectID"];
            var p2ExamineProjectName = Request["P2ExamineProjectName"];
            var p2ExamineStartTime = Request["P2ExamineStartTime"];
            var p2ExamineEndTime = Request["P2ExamineEndTime"];
            var p2AssessorOne = Request["P2AssessorOne"];
            var p2AssessorTwo = Request["P2AssessorTwo"];
            var p2ExamineTimeOffset = Request["P2ExamineTimeOffset"];
            var p2Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P2Score"]);
            var p3ExamineProjectID = Request["P3ExamineProjectID"];
            var p3ExamineProjectName = Request["P3ExamineProjectName"];
            var p3ExamineStartTime = Request["P3ExamineStartTime"];
            var p3ExamineEndTime = Request["P3ExamineEndTime"];
            var p3AssessorOne = Request["P3AssessorOne"];
            var p3AssessorTwo = Request["P3AssessorTwo"];
            var p3ExamineTimeOffset = Request["P3ExamineTimeOffset"];
            var p3Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P3Score"]);
            var p4ExamineProjectID = Request["P4ExamineProjectID"];
            var p4ExamineProjectName = Request["P4ExamineProjectName"];
            var p4ExamineStartTime = Request["P4ExamineStartTime"];
            var p4ExamineEndTime = Request["P4ExamineEndTime"];
            var p4AssessorOne = Request["P4AssessorOne"];
            var p4AssessorTwo = Request["P4AssessorTwo"];
            var p4ExamineTimeOffset = Request["P4ExamineTimeOffset"];
            var p4Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P4Score"]);
            var p5ExamineProjectID = Request["P5ExamineProjectID"];
            var p5ExamineProjectName = Request["P5ExamineProjectName"];
            var p5ExamineStartTime = Request["P5ExamineStartTime"];
            var p5ExamineEndTime = Request["P5ExamineEndTime"];
            var p5AssessorOne = Request["P5AssessorOne"];
            var p5AssessorTwo = Request["P5AssessorTwo"];
            var p5ExamineTimeOffset = Request["P5ExamineTimeOffset"];
            var p5Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P5Score"]);
            var p6ExamineProjectID = Request["P6ExamineProjectID"];
            var p6ExamineProjectName = Request["P6ExamineProjectName"];
            var p6ExamineStartTime = Request["P6ExamineStartTime"];
            var p6ExamineEndTime = Request["P6ExamineEndTime"];
            var p6AssessorOne = Request["P6AssessorOne"];
            var p6AssessorTwo = Request["P6AssessorTwo"];
            var p6ExamineTimeOffset = Request["P6ExamineTimeOffset"];
            var p6Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P6Score"]);
            var p7ExamineProjectID = Request["P7ExamineProjectID"];
            var p7ExamineProjectName = Request["P7ExamineProjectName"];
            var p7ExamineStartTime = Request["P7ExamineStartTime"];
            var p7ExamineEndTime = Request["P7ExamineEndTime"];
            var p7AssessorOne = Request["P7AssessorOne"];
            var p7AssessorTwo = Request["P7AssessorTwo"];
            var p7ExamineTimeOffset = Request["P7ExamineTimeOffset"];
            var p7Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P7Score"]);
            var p8ExamineProjectID = Request["P8ExamineProjectID"];
            var p8ExamineProjectName = Request["P8ExamineProjectName"];
            var p8ExamineStartTime = Request["P8ExamineStartTime"];
            var p8ExamineEndTime = Request["P8ExamineEndTime"];
            var p8AssessorOne = Request["P8AssessorOne"];
            var p8AssessorTwo = Request["P8AssessorTwo"];
            var p8ExamineTimeOffset = Request["P8ExamineTimeOffset"];
            var p8Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P8Score"]);
            var p9ExamineProjectID = Request["P9ExamineProjectID"];
            var p9ExamineProjectName = Request["P9ExamineProjectName"];
            var p9ExamineStartTime = Request["P9ExamineStartTime"];
            var p9ExamineEndTime = Request["P9ExamineEndTime"];
            var p9AssessorOne = Request["P9AssessorOne"];
            var p9AssessorTwo = Request["P9AssessorTwo"];
            var p9ExamineTimeOffset = Request["P9ExamineTimeOffset"];
            var p9Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P9Score"]);
            var p10ExamineProjectID = Request["P10ExamineProjectID"];
            var p10ExamineProjectName = Request["P10ExamineProjectName"];
            var p10ExamineStartTime = Request["P10ExamineStartTime"];
            var p10ExamineEndTime = Request["P10ExamineEndTime"];
            var p10AssessorOne = Request["P10AssessorOne"];
            var p10AssessorTwo = Request["P10AssessorTwo"];
            var p10ExamineTimeOffset = Request["P10ExamineTimeOffset"];
            var p10Score = ConvertUtil.ConvertStringToNullableDecimal(Request["P10Score"]);
            var totalTimeOffset = Request["TotalTimeOffset"];
            var totalScore = ConvertUtil.ConvertStringToNullableDecimal(Request["TotalScore"]);
            var makeUpProject = Request["MakeUpProject"];
            var makeUpTimes = ConvertUtil.ConvertStringToNullableInt(Request["MakeUpTimes"]);
            var passed = Request["Passed"];

            var model = new ImpBasicTwo();

            model.ID = Guid.NewGuid();

            model.TelegraphSendDate = telegraphSendDate;
            model.TelegraphReceiveDate = telegraphReceiveDate;
            model.TelegraphNO = telegraphNO;
            model.TelegraphName = telegraphName;
            model.TrainPostion = trainPostion;
            model.TrainType = trainType;
            model.ClassName = className;
            model.ClassBeginDate = classBeginDate;
            model.ClassEndDate = classEndDate;
            model.ClassTeacher = classTeacher;
            model.ClassRoom = classRoom;
            model.StuID = stuID;
            model.StuName = stuName;
            model.Sex = sex;
            model.RailwayOffice = railwayOffice;
            model.Station = station;
            model.IDCardNO = iDCardNO;
            model.WorkID = workID;
            model.TelephoneNO = telephoneNO;
            model.ExamineProject = examineProject;
            model.ExamineDate = examineDate;
            model.Invigilator = invigilator;

            model.P1ExamineProjectID = p1ExamineProjectID;
            model.P1ExamineProjectName = p1ExamineProjectName;
            model.P1ExamineStartTime = p1ExamineStartTime;
            model.P1ExamineEndTime = p1ExamineEndTime;
            model.P1AssessorOne = p1AssessorOne;
            model.P1AssessorTwo = p1AssessorTwo;
            model.P1ExamineTimeOffset = p1ExamineTimeOffset;
            model.P1Score = p1Score;

            model.P2ExamineProjectID = p2ExamineProjectID;
            model.P2ExamineProjectName = p2ExamineProjectName;
            model.P2ExamineStartTime = p2ExamineStartTime;
            model.P2ExamineEndTime = p2ExamineEndTime;
            model.P2AssessorOne = p2AssessorOne;
            model.P2AssessorTwo = p2AssessorTwo;
            model.P2ExamineTimeOffset = p2ExamineTimeOffset;
            model.P2Score = p2Score;

            model.P3ExamineProjectID = p3ExamineProjectID;
            model.P3ExamineProjectName = p3ExamineProjectName;
            model.P3ExamineStartTime = p3ExamineStartTime;
            model.P3ExamineEndTime = p3ExamineEndTime;
            model.P3AssessorOne = p3AssessorOne;
            model.P3AssessorTwo = p3AssessorTwo;
            model.P3ExamineTimeOffset = p3ExamineTimeOffset;
            model.P3Score = p3Score;

            model.P4ExamineProjectID = p4ExamineProjectID;
            model.P4ExamineProjectName = p4ExamineProjectName;
            model.P4ExamineStartTime = p4ExamineStartTime;
            model.P4ExamineEndTime = p4ExamineEndTime;
            model.P4AssessorOne = p4AssessorOne;
            model.P4AssessorTwo = p4AssessorTwo;
            model.P4ExamineTimeOffset = p4ExamineTimeOffset;
            model.P4Score = p4Score;

            model.P5ExamineProjectID = p5ExamineProjectID;
            model.P5ExamineProjectName = p5ExamineProjectName;
            model.P5ExamineStartTime = p5ExamineStartTime;
            model.P5ExamineEndTime = p5ExamineEndTime;
            model.P5AssessorOne = p5AssessorOne;
            model.P5AssessorTwo = p5AssessorTwo;
            model.P5ExamineTimeOffset = p5ExamineTimeOffset;
            model.P5Score = p5Score;

            model.P6ExamineProjectID = p6ExamineProjectID;
            model.P6ExamineProjectName = p6ExamineProjectName;
            model.P6ExamineStartTime = p6ExamineStartTime;
            model.P6ExamineEndTime = p6ExamineEndTime;
            model.P6AssessorOne = p6AssessorOne;
            model.P6AssessorTwo = p6AssessorTwo;
            model.P6ExamineTimeOffset = p6ExamineTimeOffset;
            model.P6Score = p6Score;

            model.P7ExamineProjectID = p7ExamineProjectID;
            model.P7ExamineProjectName = p7ExamineProjectName;
            model.P7ExamineStartTime = p7ExamineStartTime;
            model.P7ExamineEndTime = p7ExamineEndTime;
            model.P7AssessorOne = p7AssessorOne;
            model.P7AssessorTwo = p7AssessorTwo;
            model.P7ExamineTimeOffset = p7ExamineTimeOffset;
            model.P7Score = p7Score;

            model.P8ExamineProjectID = p8ExamineProjectID;
            model.P8ExamineProjectName = p8ExamineProjectName;
            model.P8ExamineStartTime = p8ExamineStartTime;
            model.P8ExamineEndTime = p8ExamineEndTime;
            model.P8AssessorOne = p8AssessorOne;
            model.P8AssessorTwo = p8AssessorTwo;
            model.P8ExamineTimeOffset = p8ExamineTimeOffset;
            model.P8Score = p8Score;

            model.P9ExamineProjectID = p9ExamineProjectID;
            model.P9ExamineProjectName = p9ExamineProjectName;
            model.P9ExamineStartTime = p9ExamineStartTime;
            model.P9ExamineEndTime = p9ExamineEndTime;
            model.P9AssessorOne = p9AssessorOne;
            model.P9AssessorTwo = p9AssessorTwo;
            model.P9ExamineTimeOffset = p9ExamineTimeOffset;
            model.P9Score = p9Score;

            model.P10ExamineProjectID = p10ExamineProjectID;
            model.P10ExamineProjectName = p10ExamineProjectName;
            model.P10ExamineStartTime = p10ExamineStartTime;
            model.P10ExamineEndTime = p10ExamineEndTime;
            model.P10AssessorOne = p10AssessorOne;
            model.P10AssessorTwo = p10AssessorTwo;
            model.P10ExamineTimeOffset = p10ExamineTimeOffset;
            model.P10Score = p10Score;

            model.TotalTimeOffset = totalTimeOffset;
            model.TotalScore = totalScore;
            model.MakeUpProject = makeUpProject;
            model.MakeUpTimes = makeUpTimes;
            model.Passed = passed;

            model.CreateTime = System.DateTime.Now;
            model.CreateID = CurrentUser.UserId;
            model.CreateName = CurrentUser.UserName;
            model.IsValid = true;
            try
            {
                unitOfWork.ImpBasicTwoBLL.InsertEntity(model);
                unitOfWork.Save();
                return "";
            }
            catch (Exception ex)
            {
                Log.Error("保存认证部反馈实作基本信息异常:" + ex.Message, ex);
                return "系统异常,请联系管理员!";
            }
        }
Beispiel #2
0
        private string ImpBasicTwoImport(DataTable dt)
        {
            if (dt != null)
            {
                foreach (DataRow row in dt.Rows)
                {
                    //发报时间	收报时间	电报号	电报名称	培训岗位	培训班性质	班级名称
                    //开班日期	结束日期	班主任	教室	学员编号	姓名	性别	所在路局	所在站段
                    //身份证号	工作证号	手机号	抽考项目	考评日期	监考员
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //考核项目编号	考核项目名称	考试起始时间	考试结束时间	考评员1	考评员2	时长	成绩
                    //总用时	总成绩	补考项目	补考次数	是否合格

                    var model = new ImpBasicTwo();

                    model.ID = Guid.NewGuid();

                    model.TelegraphSendDate = ConvertUtil.ConvertObjToNullableDateTime(row["发报时间"]);
                    model.TelegraphReceiveDate = ConvertUtil.ConvertObjToNullableDateTime(row["收报时间"]);
                    model.TelegraphNO = row["电报号"].ToString();
                    model.TelegraphName = row["电报名称"].ToString();
                    model.TrainPostion = row["培训岗位"].ToString();
                    model.TrainType = row["培训班性质"].ToString();
                    model.ClassName = row["班级名称"].ToString();
                    model.ClassBeginDate = ConvertUtil.ConvertObjToNullableDateTime(row["开班日期"]);
                    model.ClassEndDate = ConvertUtil.ConvertObjToNullableDateTime(row["结束日期"]);
                    model.ClassTeacher = row["班主任"].ToString();
                    model.ClassRoom = row["教室"].ToString();
                    model.StuID = row["学员编号"].ToString();
                    model.StuName = row["姓名"].ToString();
                    model.Sex = row["性别"].ToString();
                    model.RailwayOffice = row["所在路局"].ToString();
                    model.Station = row["所在站段"].ToString();
                    model.IDCardNO = row["身份证号"].ToString();
                    model.WorkID = row["工作证号"].ToString();
                    model.TelephoneNO = row["手机号"].ToString();
                    model.ExamineProject = row["抽考项目"].ToString();
                    model.ExamineDate = ConvertUtil.ConvertObjToNullableDateTime(row["考评日期"]);
                    model.Invigilator = row["监考员"].ToString();

                    model.P1ExamineProjectID = row["考核项目编号(一)"].ToString();
                    model.P1ExamineProjectName = row["考核项目名称(一)"].ToString();
                    model.P1ExamineStartTime = row["考试起始时间(一)"].ToString();
                    model.P1ExamineEndTime = row["考试结束时间(一)"].ToString();
                    model.P1AssessorOne = row["考评员1(一)"].ToString();
                    model.P1AssessorTwo = row["考评员2(一)"].ToString();
                    model.P1ExamineTimeOffset = row["时长(一)"].ToString();
                    model.P1Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(一)"]);

                    model.P2ExamineProjectID = row["考核项目编号(二)"].ToString();
                    model.P2ExamineProjectName = row["考核项目名称(二)"].ToString();
                    model.P2ExamineStartTime = row["考试起始时间(二)"].ToString();
                    model.P2ExamineEndTime = row["考试结束时间(二)"].ToString();
                    model.P2AssessorOne = row["考评员1(二)"].ToString();
                    model.P2AssessorTwo = row["考评员2(二)"].ToString();
                    model.P2ExamineTimeOffset = row["时长(二)"].ToString();
                    model.P2Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(二)"]);

                    model.P3ExamineProjectID = row["考核项目编号(三)"].ToString();
                    model.P3ExamineProjectName = row["考核项目名称(三)"].ToString();
                    model.P3ExamineStartTime = row["考试起始时间(三)"].ToString();
                    model.P3ExamineEndTime = row["考试结束时间(三)"].ToString();
                    model.P3AssessorOne = row["考评员1(三)"].ToString();
                    model.P3AssessorTwo = row["考评员2(三)"].ToString();
                    model.P3ExamineTimeOffset = row["时长(三)"].ToString();
                    model.P3Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(三)"]);

                    model.P4ExamineProjectID = row["考核项目编号(四)"].ToString();
                    model.P4ExamineProjectName = row["考核项目名称(四)"].ToString();
                    model.P4ExamineStartTime = row["考试起始时间(四)"].ToString();
                    model.P4ExamineEndTime = row["考试结束时间(四)"].ToString();
                    model.P4AssessorOne = row["考评员1(四)"].ToString();
                    model.P4AssessorTwo = row["考评员2(四)"].ToString();
                    model.P4ExamineTimeOffset = row["时长(四)"].ToString();
                    model.P4Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(四)"]);

                    model.P5ExamineProjectID = row["考核项目编号(五)"].ToString();
                    model.P5ExamineProjectName = row["考核项目名称(五)"].ToString();
                    model.P5ExamineStartTime = row["考试起始时间(五)"].ToString();
                    model.P5ExamineEndTime = row["考试结束时间(五)"].ToString();
                    model.P5AssessorOne = row["考评员1(五)"].ToString();
                    model.P5AssessorTwo = row["考评员2(五)"].ToString();
                    model.P5ExamineTimeOffset = row["时长(五)"].ToString();
                    model.P5Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(五)"]);

                    model.P6ExamineProjectID = row["考核项目编号(六)"].ToString();
                    model.P6ExamineProjectName = row["考核项目名称(六)"].ToString();
                    model.P6ExamineStartTime = row["考试起始时间(六)"].ToString();
                    model.P6ExamineEndTime = row["考试结束时间(六)"].ToString();
                    model.P6AssessorOne = row["考评员1(六)"].ToString();
                    model.P6AssessorTwo = row["考评员2(六)"].ToString();
                    model.P6ExamineTimeOffset = row["时长(六)"].ToString();
                    model.P6Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(六)"]);

                    model.P7ExamineProjectID = row["考核项目编号(七)"].ToString();
                    model.P7ExamineProjectName = row["考核项目名称(七)"].ToString();
                    model.P7ExamineStartTime = row["考试起始时间(七)"].ToString();
                    model.P7ExamineEndTime = row["考试结束时间(七)"].ToString();
                    model.P7AssessorOne = row["考评员1(七)"].ToString();
                    model.P7AssessorTwo = row["考评员2(七)"].ToString();
                    model.P7ExamineTimeOffset = row["时长(七)"].ToString();
                    model.P7Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(七)"]);

                    model.P8ExamineProjectID = row["考核项目编号(八)"].ToString();
                    model.P8ExamineProjectName = row["考核项目名称(八)"].ToString();
                    model.P8ExamineStartTime = row["考试起始时间(八)"].ToString();
                    model.P8ExamineEndTime = row["考试结束时间(八)"].ToString();
                    model.P8AssessorOne = row["考评员1(八)"].ToString();
                    model.P8AssessorTwo = row["考评员2(八)"].ToString();
                    model.P8ExamineTimeOffset = row["时长(八)"].ToString();
                    model.P8Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(八)"]);

                    model.P9ExamineProjectID = row["考核项目编号(九)"].ToString();
                    model.P9ExamineProjectName = row["考核项目名称(九)"].ToString();
                    model.P9ExamineStartTime = row["考试起始时间(九)"].ToString();
                    model.P9ExamineEndTime = row["考试结束时间(九)"].ToString();
                    model.P9AssessorOne = row["考评员1(九)"].ToString();
                    model.P9AssessorTwo = row["考评员2(九)"].ToString();
                    model.P9ExamineTimeOffset = row["时长(九)"].ToString();
                    model.P9Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(九)"]);

                    model.P10ExamineProjectID = row["考核项目编号(十)"].ToString();
                    model.P10ExamineProjectName = row["考核项目名称(十)"].ToString();
                    model.P10ExamineStartTime = row["考试起始时间(十)"].ToString();
                    model.P10ExamineEndTime = row["考试结束时间(十)"].ToString();
                    model.P10AssessorOne = row["考评员1(十)"].ToString();
                    model.P10AssessorTwo = row["考评员2(十)"].ToString();
                    model.P10ExamineTimeOffset = row["时长(十)"].ToString();
                    model.P10Score = ConvertUtil.ConvertObjToNullableDecimal(row["成绩(十)"]);

                    model.TotalTimeOffset = row["总用时"].ToString();
                    model.TotalScore = ConvertUtil.ConvertObjToNullableDecimal(row["总成绩"]);
                    model.MakeUpProject = row["补考项目"].ToString();
                    model.MakeUpTimes = ConvertUtil.ConvertObjToNullableInt(row["补考次数"]);
                    model.Passed = row["是否合格"].ToString();

                    model.CreateTime = System.DateTime.Now;
                    model.CreateID = CurrentUser.UserId;
                    model.CreateName = CurrentUser.UserName;
                    model.IsValid = true;

                    unitOfWork.ImpBasicTwoBLL.InsertEntity(model);

                }
                unitOfWork.Save();
            }

            return "";
        }