コード例 #1
0
 public string GetRestRoom(int id)
 {
     try
     {
         Model.CCOM.Examination_arrangement exam_model = new BLL.CCOM.Examination_arrangement().GetModel(id);
         Model.CCOM.Examination_room        model      = new BLL.CCOM.Examination_room().GetModel((int)exam_model.Ea_restroom);
         return(model.Er_building + "/" + model.Er_floor + "层/" + model.Er_room + "/" + model.Er_capacity + "人");
     }
     catch
     {
         return("");
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.CCOM.Period pbll   = new BLL.CCOM.Period();
            var             pmodel = pbll.GetModel("Period_state=1");

            periodYear = pmodel.Period_year;
            examId     = Convert.ToInt32(DESEncrypt.Decrypt(MyRequest.GetQueryString("examId")));
            BLL.CCOM.Examination_arrangement bll = new BLL.CCOM.Examination_arrangement();
            var model     = bll.GetModel(examId);
            var roomModel = new BLL.CCOM.Examination_room().GetModel(model.Ea_room);

            examInfo += model.Ea_name + "  " + model.Ea_starttime.ToString("M月d日 hh:mm") + "    " + roomModel.Er_building + roomModel.Er_room;
            showStudentInfo();
        }
コード例 #3
0
        private void RalBind()
        {
            try
            {
                var modelList = new BLL.CCOM.Judge().GetModelList("");

                if (modelList.Count > 0)
                {
                    foreach (Model.CCOM.Judge judge in modelList)
                    {
                        ListItem item = new ListItem();
                        item.Text  = judge.Judge_name.ToString() + " # " + judge.Judge_staff_number;
                        item.Value = judge.Judge_id.ToString();
                        this.ddlJudge_ID.Items.Add(item);
                    }
                }
                ListItem item1 = new ListItem("--请选择评委--", "#");
                this.ddlJudge_ID.Items.Insert(0, item1);


                var examList = new BLL.CCOM.View_AEE_ManegeSubject().GetModelList(" Period_id = " + period_id + " AND User_id=" + user_id + " order by Ea_id asc");
                if (examList.Count > 0)
                {
                    int Ea_id = 0;
                    foreach (Model.CCOM.View_AEE_ManegeSubject exam in examList)
                    {
                        int _Ea_id = exam.Ea_id;
                        if (Ea_id != _Ea_id)
                        {
                            Ea_id = _Ea_id;

                            var exam_detail = new BLL.CCOM.Examination_arrangement().GetModel(Ea_id);

                            ListItem item = new ListItem();
                            item.Text  = exam_detail.Ea_name.ToString();
                            item.Value = exam_detail.Ea_id.ToString();

                            this.ddlExam.Items.Add(item);
                        }
                    }
                }
                ListItem item2 = new ListItem("--请选择考试--", "#");
                this.ddlExam.Items.Insert(0, item2);
            }
            catch
            {
                JscriptMsg("数据出错", "", "Error");
            }
        }
コード例 #4
0
 public string getRoomName(int Ea_id)
 {
     try
     {
         var exam    = new BLL.CCOM.Examination_arrangement().GetModel(Ea_id);
         int room_id = exam.Ea_room;
         var room    = new BLL.CCOM.Examination_room().GetModel(room_id);
         return(" -" + room.Er_building + room.Er_floor + "楼" + room.Er_room + " -考试开始时间: " + exam.Ea_starttime);
     }
     catch
     {
         JscriptMsg("获取考试出错", "", "Error");
     }
     return("");
 }
コード例 #5
0
        protected void bindUserInfo()
        {
            //int[] margin = {1,1,2,2,2,3,3,4};
            long _id = GetAdminInfo_CCOM().User_id;
            var user_model = new BLL.CCOM.User_infomation().GetModel(_id);
            if ((int)user_model.User_type != 1)
            {
                JscriptMsg("只有考生才有打印准考证功能", "/AdminMetro/index.aspx", "Error");
                return;
            }
            var property_model = new BLL.CCOM.User_property().GetModel(" User_id=" + _id);
            if (property_model != null)
            {
                if (property_model.UP_picture != null && property_model.UP_picture != "")
                {
                    if (!property_model.UP_picture.StartsWith("http"))
                    {
                        this.stu_pic.Src = DataDic.FILE_URL + property_model.UP_picture;
                    }
                    else
                    {
                        this.stu_pic.Src = property_model.UP_picture;
                    }
                }
                else
                {
                    this.stu_pic.Src = "/admin/images/default_user_avatar.gif";
                }
                try
                {
                    int period = int.Parse(new BLL.CCOM.Period().GetModel(property_model.Period_id).Period_year);
                    this.tit.Text = "中央音乐学院本科招生" + period + "年专业考试准考证";
                }
                catch
                {
                    JscriptMsg("考生信息出错", "/AdminMetro/index.aspx", "Error");
                    //Response.Redirect("");
                }
                
                this.print_time.Text = "打印时间:" + DateTime.Now.ToString("yyyy年MM月dd日");
                //var user_model = new BLL.CCOM.User_infomation().GetModel(_id);
                this.stu_name.Text = user_model.User_realname;
                this.addmission_number.Text = property_model.UP_CCOM_number;
                this.ID_number.Text = user_model.User_ID_number;
                //this.qrcode.Src = "QrCode.ashx?data=" + DESEncrypt.Encrypt(property_model.UP_CCOM_number);
                if (property_model.Agency_id >0)
                {
                    var angency_model = new BLL.CCOM.Agency().GetModel(property_model.Agency_id);
                    if (angency_model != null)
                    {
                        this.major.Text = angency_model.Agency_name;
                    }

                    //获取报考科目
                    int majorId = property_model.Agency_id;
                    //科目字典
                    BLL.CCOM.Subject sub_bll = new BLL.CCOM.Subject();
                    try
                    {
                        List<Model.CCOM.Subject> subjectList = sub_bll.GetModelList("Major_Agency_id=" + majorId);
                        foreach (Model.CCOM.Subject subject in subjectList)
                        {
                            subjectDic.Add(subject.Subject_id, subject);
                        }
                    }
                    catch (Exception e)
                    {
                        return;
                    }
                    root = sub_bll.GetModel("Major_Agency_id=" + majorId + "and Subject_level=0");
                    foreach (Model.CCOM.Subject Cmodel in subjectDic.Values)
                    {
                        if (Cmodel.Fs_id == root.Subject_id)
                        {
                            BindSubject(Cmodel,0, true);
                        }
                    }


                    //获取已排考科目
                    //var exam_list = new BLL.CCOM.Examination_arrangement_detail().GetModelList(" User_id=" + GetAdminInfo_CCOM().User_id);
                    //if (exam_list != null && exam_list.Count>0)
                    //{
                    //    var bll = new BLL.CCOM.Examination_subject();
                    //    Model.CCOM.Examination_subject model = null;
                    //    for(int i=0;i<exam_list.Count;i++)
                    //    {
                    //        model = bll.GetModel(" Ea_id="+exam_list[i].Ea_id);

                    //    }
                    //}
                    //else//未有排考信息
                    //{
                    //    JscriptMsg("尚未排考完成,请等候排考结束再行打印!", "/AdminMetro/index.aspx", "Error");
                    //    return;
                    //}



                    long user_id = GetAdminInfo_CCOM().User_id;
                    int flag = 0;//记录该场考试是否已排该考生
                    StringBuilder sb = new StringBuilder();
                    BLL.CCOM.Examination_subject exam_sub_bll = new BLL.CCOM.Examination_subject();
                    BLL.CCOM.Examination_arrangement_detail exam_detail_bll = new BLL.CCOM.Examination_arrangement_detail();

                    int single = 0; //单选只输出一次
                    for (int i = 0; i < sub.Count; i++)
                    {
                        var exam_sub_model_list = exam_sub_bll.GetModelList(" Esn_id=" + sub[i]);
                        if (exam_sub_model_list != null)
                        {
                            for (int j = 0; j < exam_sub_model_list.Count; j++)
                            {
                                if (single == 1)
                                {
                                    single = 0;
                                    continue;
                                }
                                if (new BLL.CCOM.Subject().GetModel(sub[i]).Value_type == 1 && single == 0)
                                {
                                    single = 1;
                                }

                                flag = 0;
                                var detail_model_list = exam_detail_bll.GetModelList(" Ea_id=" + exam_sub_model_list[j].Ea_id);
                                for (int k = 0; k < detail_model_list.Count; k++)
                                {
                                    if (detail_model_list[k].User_id == user_id)
                                    {
                                        
                                        flag = 1;
                                        var model = new BLL.CCOM.Examination_arrangement().GetModel(" Ea_id=" + detail_model_list[k].Ea_id);
                                        string st_time = model.Ea_starttime.ToString("MM月dd日hh:mm");
                                        //st_time = st_time.Substring(0, st_time.Length - 6);
                                        string end_time = ((DateTime)model.Ea_endtime).ToString("hh:mm");
                                        var room = new BLL.CCOM.Examination_room().GetModel(model.Ea_room);
                                        
                                        sb.Append("<div class=\"exam_line\">");
                                        sb.Append("<div class=\"course\">");
                                        sb.Append("<span>");
                                        sb.Append(model.Ea_name);
                                        sb.Append("</span>");
                                        sb.Append("</div>");
                                        sb.Append("<div class=\"arrange\">");
                                        sb.Append("<span>");
                                        sb.Append(st_time+"-"+end_time);
                                        sb.Append("</span>");
                                        sb.Append("<br />");
                                        sb.Append("<span >");
                                        sb.Append("考场:"+room.Er_building+room.Er_room);
                                        if (model.Ea_restroom != null)
                                        {
                                            var rest_room = new BLL.CCOM.Examination_room().GetModel((int)model.Ea_restroom);
                                            sb.Append(" 候考场:" + room.Er_building +    room.Er_room);
                                        }
                                        sb.Append("</span>");
                                        sb.Append(" </div>");
                                        sb.Append(" </div>");

                                        break;
                                    }
                                }
                                if (flag == 0)//该科目尚未排考
                                {

                                }
                            }
                        }
                    }
                    this.exam_info.InnerHtml=sb.ToString();
                }
                if (user_model.User_gender != null)
                {
                    if ((bool)user_model.User_gender)
                    {
                        this.gender.Text = "女";
                    }
                    else
                    {
                        this.gender.Text = "男";
                    }
                }
            }
            else
            {
                JscriptMsg("考生不存在", "", "Error");
                return;
            }
        }