Ejemplo n.º 1
0
        protected void Bind()
        {
            string strWhere = " Agency_type=" + DataDic.CCOM_Clique_type;

            BLL.CCOM.Agency Bll = new BLL.CCOM.Agency();
            DataSet         ds  = Bll.GetList(strWhere);

            this.ddlClique.DataSource     = ds.Tables[0].DefaultView;
            this.ddlClique.DataTextField  = "Agency_name";
            this.ddlClique.DataValueField = "Agency_id";
            this.ddlClique.DataBind();
            if (agency_id == 1)
            {
                this.ddlClique.SelectedIndex = 0;
                clique_id = this.ddlClique.SelectedValue;
            }
            else
            {
                this.ddlClique.SelectedValue = agency_id.ToString();
                this.ddlClique.Enabled       = false;
            }
            clique_id = this.ddlClique.SelectedValue;
            ddlClique_SelectedIndexChanged(null, null);

            var bll = new BLL.CCOM.Province();

            this.rptList1.DataSource = bll.GetList("");
            this.rptList1.DataBind();
        }
Ejemplo n.º 2
0
        private void RptBind()
        {
            string order    = "UP_CCOM_number asc";
            string strWhere = CombSqlTxt(this.keywords);

            var bll = new BLL.CCOM.Province();

            this.ddlProvince.DataSource     = bll.GetAllList();
            this.ddlProvince.DataTextField  = "Province_name";
            this.ddlProvince.DataValueField = "Province_id";
            this.ddlProvince.DataBind();
            ListItem item = new ListItem("--所有省份--", "0");

            this.ddlProvince.Items.Insert(0, item);
            if (!string.IsNullOrEmpty(pro_id))
            {
                this.ddlProvince.SelectedValue = pro_id;
            }
            try
            {
                RptBind(strWhere, order);
            }
            catch
            {
                JscriptMsg("获取考生成绩出错", "", "Error");
            }
        }
        public string GetProvinceName(int id)
        {
            var model = new BLL.CCOM.Province().GetModel(id);

            if (model != null)
            {
                return(model.Province_name);
            }
            return("--");
        }
        private void RptBind()
        {
            var bll = new BLL.CCOM.Province();

            this.ddlPro_ID.DataSource     = bll.GetAllList();
            this.ddlPro_ID.DataTextField  = "Province_name";
            this.ddlPro_ID.DataValueField = "Province_id";
            this.ddlPro_ID.DataBind();
            ListItem item = new ListItem("--请选择省份--", "#");

            this.ddlPro_ID.Items.Insert(0, item);
        }
Ejemplo n.º 5
0
        public string GetProvinceName(string pro_id)
        {
            string pro_name = "";

            try
            {
                var bll   = new BLL.CCOM.Province();
                var model = bll.GetModel(" Province_id=" + pro_id);
                pro_name = model.Province_name;
            }
            catch
            {
            }
            return(pro_name);
        }
Ejemplo n.º 6
0
        public string GetProvince(string UserID)
        {
            BLL.CCOM.User_property bll = new BLL.CCOM.User_property();
            string str = string.Empty;

            try
            {
                Model.CCOM.User_property model = bll.GetModel(" User_id='" + UserID + "'");
                str = new BLL.CCOM.Province().GetModel((int)model.UP_province).Province_name;
            }
            catch
            {
                str = "未设置";
            }
            return(str);
        }
Ejemplo n.º 7
0
        protected String GetName(int id)
        {
            switch (this.selectid)
            {
            case "1":
                bll_province = new BLL.CCOM.Province();
                return(bll_province.GetModel(" " + selectIndex + "=" + id).Province_name);

            case "2":
                bll_politics = new BLL.CCOM.Politics();
                return(bll_politics.GetModel(" " + selectIndex + "=" + id).Politics_name);

            case "3":
                bll_nationality = new BLL.CCOM.Nationality();
                return(bll_nationality.GetModel(" " + selectIndex + "=" + id).Nationality_name);

            case "4":
                bll_nation = new BLL.CCOM.Nation();
                return(bll_nation.GetModel(" " + selectIndex + "=" + id).Nation_name);

            case "5":
                bll_musical_instrument = new BLL.CCOM.Musical_instrument();
                return(bll_musical_instrument.GetModel(" " + selectIndex + "=" + id).Mi_name);

            case "6":
                bll_degree = new BLL.CCOM.Degree();
                return(bll_degree.GetModel(" " + selectIndex + "=" + id).Degree_name);

            case "7":
                bll_certivicate_type = new BLL.CCOM.Certificate_type();
                return(bll_certivicate_type.GetModel(" " + selectIndex + "=" + id).Ct_name);

            default:
                return("");
            }
        }
        //动态生成Excel
        protected void prodExcel_Click(object sender, EventArgs e)
        {
            bool        res     = true;
            string      xlsName = "批量导入分数线模板";
            Application excel   = new Application();

            try
            {
                excel.Workbooks.Add(true);
                excel.Visible = false;

                excel.Cells[1, 1]  = "省份";
                excel.Cells[1, 2]  = "文科一本线";
                excel.Cells[1, 3]  = "理科一本线";
                excel.Cells[1, 4]  = "文科二本线";
                excel.Cells[1, 5]  = "理科二本线";
                excel.Cells[1, 6]  = "文科三本线";
                excel.Cells[1, 7]  = "理科三本线";
                excel.Cells[1, 8]  = "艺术类最低控制线(文科)";
                excel.Cells[1, 9]  = "艺术类最低控制线(理科)";
                excel.Cells[1, 10] = "文科满分";
                excel.Cells[1, 11] = "理科满分";

                Range noticerange = excel.Range[excel.Cells[1, 12], excel.Cells[11, 15]];
                noticerange.MergeCells = true;
                noticerange.WrapText   = true;
                noticerange.Font.Size  = 15;
                noticerange.set_Value(Type.Missing, "提示:请勿修改默认字段名称以及顺序,个别字段需从下拉列表中选取填写内容,给您带来的不便敬请见谅!");
                noticerange.Font.ColorIndex = 3;
                noticerange.Font.Bold       = true;

                //获取标题行的单元格
                Range range = excel.Range[excel.Cells[1, 1], excel.Cells[1, 11]];
                range.Font.Bold       = true;          //设置字体加粗
                range.Font.ColorIndex = 0;             //设置字体颜色
                //设置颜色背景
                //range.Interior.ColorIndex = 15;

                //给必填项添加样式
                range = excel.Range[excel.Cells[1, 1], excel.Cells[1, 1]];   //获取标题行的单元格
                range.Font.ColorIndex = 3;                                   //设置字体颜色
                range = excel.Range[excel.Cells[1, 10], excel.Cells[1, 11]]; //获取标题行的单元格
                range.Font.ColorIndex = 3;                                   //设置字体颜色

                //-----做省份的下拉列表-----//
                range = excel.Range[excel.Cells[2, 1], excel.Cells[9999, 1]];
                string            listStr = "";
                BLL.CCOM.Province bllPro  = new BLL.CCOM.Province();
                DataSet           dsPro   = bllPro.GetList("");

                for (int i = 0; i < dsPro.Tables["ds"].Rows.Count; i++)
                {
                    listStr += dsPro.Tables["ds"].Rows[i]["Province_name"].ToString().Trim() + ",";
                }
                listStr = listStr.Substring(0, listStr.Length - 1);

                range.Validation.Add(Excel.XlDVType.xlValidateList, Excel.XlDVAlertStyle.xlValidAlertStop, Type.Missing, listStr, Type.Missing);
                xlsName = xlsName + ".xlsx";
                string serverUrl = Server.MapPath("~/");//serverUrl + xlsName

                //excel.ActiveWorkbook.SaveAs(serverUrl + xlsName,Excel.XlFileFormat.xlExcel8);
                excel.ActiveWorkbook.SaveCopyAs(serverUrl + xlsName);

                FileStream myFileStream = new FileStream(serverUrl + xlsName, FileMode.Open);

                long   fileSize = myFileStream.Length;
                byte[] buffer   = new byte[(int)fileSize];
                myFileStream.Read(buffer, 0, (int)fileSize);
                myFileStream.Close();


                HttpResponse response = System.Web.HttpContext.Current.Response;
                response.Clear();
                response.Charset     = "UTF-8";
                response.ContentType = "application/vnd.ms-excel";

                response.AppendHeader("Content-Disposition", string.Format("attachment; filename=" + HttpUtility.UrlEncode(xlsName, Encoding.UTF8).ToString()));
                response.BinaryWrite(buffer);
                response.Flush();
                response.Close();

                File.Delete(serverUrl + xlsName);
            }
            catch (Exception ex)
            {
                LOGGER.Debug(ex.Message, ex);
                res = false;
            }
            finally
            {
                excel.DisplayAlerts = false;
                excel.ActiveWorkbook.Application.DisplayAlerts = false;
                excel.Quit();
                excel = null;//这一句是非常重要的,否则Excel对象不能从内存中退出
            }
            if (!res)
            {
                string msbox = "parent.f_errorTab(\"错误提示\", \"对不起,导出出错,请重新尝试!\");";
                Response.Write("<script type=\"text/javascript\">" + msbox + "</script>");
                Response.End();
            }
        }
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            string result = "";

            if (this.txtFraUpload.PostedFile.FileName == "")
            {
                JscriptMsg("请选择上传文件", "", "Error");
                return;
            }
            DataSet ds   = new DataSet();
            string  path = "/upload/excel/";

            #region 解决360获取绝对路径导致出错的问题
            string   AbsolutePath = this.txtFraUpload.PostedFile.FileName;
            string[] pathList     = new string[] { };

            pathList     = AbsolutePath.Split('\\');
            AbsolutePath = pathList[pathList.Length - 1];
            #endregion

            string fileName = DateTime.Now.ToFileTime() + "_" + AbsolutePath;
            string FexName  = fileName.Substring(fileName.LastIndexOf(".") + 1);
            if (FexName != "xls" && FexName != "xlsx")
            {
                JscriptMsg("请上传Excel文件", "", "Error");
                return;
            }

            string filePath = Server.MapPath(path + fileName);

            this.txtFraUpload.SaveAs(filePath);
            int success = 0, error = 0;
            try
            {
                BLL.CCOM.Province PBll = new BLL.CCOM.Province();

                var excel = new Common.ExcelToData();
                ds = excel.GetExcelData(filePath);

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string _ProName = ds.Tables[0].Rows[i]["省份"].ToString().Trim();

                    var p_model = PBll.GetModel("Province_name='" + _ProName + "'");
                    if (p_model == null)
                    {
                        result += "×第" + (i + 1).ToString() + "行添加失败,该省份‘" + ds.Tables[0].Rows[i]["省份"].ToString().Trim() + "’不存在,请按照模板格式下拉选择;<br/>";
                        error++;
                        continue;
                    }

                    var model  = new Model.CCOM.Fractional_line();
                    var _model = new Model.CCOM.Fractional_line();

                    int Pro_id = p_model.Province_id;
                    model = new BLL.CCOM.Fractional_line().GetModel(" Period_id = " + period_id + " and Fl_Province=" + Pro_id);

                    _model.WenKeYiBen     = ((ds.Tables[0].Rows[i]["文科一本线"].ToString().Trim() == "") ? 0 : (Convert.ToDecimal(ds.Tables[0].Rows[i]["文科一本线"].ToString().Trim())));
                    _model.LiKeYiBen      = (ds.Tables[0].Rows[i]["理科一本线"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["理科一本线"].ToString().Trim()));
                    _model.WenKeErBen     = (ds.Tables[0].Rows[i]["文科二本线"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["文科二本线"].ToString().Trim()));
                    _model.LiKeErBen      = (ds.Tables[0].Rows[i]["理科二本线"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["理科二本线"].ToString().Trim()));
                    _model.WenKeSanBen    = (ds.Tables[0].Rows[i]["文科三本线"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["文科三本线"].ToString().Trim()));
                    _model.LiKeSanBen     = (ds.Tables[0].Rows[i]["理科三本线"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["理科三本线"].ToString().Trim()));
                    _model.WenKeYiShuXian = (ds.Tables[0].Rows[i]["艺术类最低控制线(文科)"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["艺术类最低控制线(文科)"].ToString().Trim()));
                    _model.LiKeYiShuXian  = (ds.Tables[0].Rows[i]["艺术类最低控制线(理科)"].ToString().Trim() == "" ? 0 : Convert.ToDecimal(ds.Tables[0].Rows[i]["艺术类最低控制线(理科)"].ToString().Trim()));
                    if (ds.Tables[0].Rows[i]["文科满分"].ToString().Trim() == "")
                    {
                        result += "×第" + (i + 1).ToString() + "行添加失败,文科满分不能为空;<br/>";
                        error++;
                        continue;
                    }
                    _model.WenKeZongFen = Convert.ToDecimal(ds.Tables[0].Rows[i]["文科满分"].ToString().Trim());
                    if (ds.Tables[0].Rows[i]["理科满分"].ToString().Trim() == "")
                    {
                        result += "×第" + (i + 1).ToString() + "行添加失败,理科满分不能为空;<br/>";
                        error++;
                        continue;
                    }
                    _model.LiKeZongFen = Convert.ToDecimal(ds.Tables[0].Rows[i]["理科满分"].ToString().Trim());

                    bool isOK = false;
                    if (model != null)
                    {
                        _model.Fl_id       = model.Fl_id;
                        _model.Period_id   = model.Period_id;
                        _model.Fl_Province = model.Fl_Province;
                        _model.Fl_addtime  = model.Fl_addtime;
                        isOK = DoUpdate(_model);
                    }
                    else
                    {
                        _model.Fl_Province = Pro_id;
                        _model.Period_id   = period_id;
                        _model.Fl_addtime  = DateTime.Now;
                        isOK = DoAdd(_model);
                    }

                    if (isOK)
                    {
                        success++;
                    }
                    else
                    {
                        result += "×第" + (i + 1).ToString() + "行‘" + ds.Tables[0].Rows[i]["省份"].ToString().Trim() + "’信息异常,导入失败。<br/>";
                        error++;
                    }
                }
                new Calculation().calculateFenShuXian();
            }
            catch (Exception ex)
            {
                ILog LOGGER = LogManager.GetLogger("quanquan");
                LOGGER.Debug("导入分数线异常" + ex.Message, ex);
                result = "导入分数线异常,请联系客服";
            }

            string divinfo = "<div class=\"alert alert-block alert-info fade in\">";
            divinfo += "<button data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>";
            divinfo += "<h4 class=\"alert-heading\">导入结果</h4>";
            divinfo += "<p>";
            if (success != ds.Tables[0].DefaultView.Count)
            {
                divinfo += "部分导入成功,您可以按照提示修改Excel并重新提交<br>";
            }
            else
            {
                divinfo += "全部导入成功,请您进入下一步确认导入信息<br>";
            }
            divinfo += "*共有" + ds.Tables[0].DefaultView.Count + "条数据,成功" + success + "条,失败" + error + "条;<br/>";
            if (result != "")
            {
                divinfo += "详细信息如下:<br><font color='red'>" + result;
            }
            divinfo           += "</font></p>";
            divinfo           += "</div>";
            this.lblError.Text = divinfo;

            //显示下一步
            if (success > 0)
            {
                this.btnSubmit.Visible = true;
            }
            //删除上传的文件
            File.Delete(filePath);
        }
Ejemplo n.º 10
0
        //tab1===================
        #region 数据绑定=================================
        private void RptBind(string _strWhere, string _order)
        {
            int pageSize = GetPageSize(15); //每页数量
            int page     = MyRequest.GetQueryInt("page", 1);
            //string keywords = MyRequest.GetQueryString("keywords");
            string keywords    = this.keywordTab0;
            int    start_index = pageSize * (page - 1) + 1;
            int    end_index   = pageSize * page;

            this.txtKeywords.Text = keywords;

            int totalCount = 0;

            switch (this.ddlResourceType.SelectedValue)
            {
            case "1":
                bll_province            = new BLL.CCOM.Province();
                totalCount              = bll_province.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_province.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "2":
                bll_politics            = new BLL.CCOM.Politics();
                totalCount              = bll_politics.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_politics.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "3":
                bll_nationality         = new BLL.CCOM.Nationality();
                totalCount              = bll_nationality.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_nationality.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "4":
                bll_nation = new BLL.CCOM.Nation();
                totalCount = bll_nation.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_nation.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "5":
                bll_musical_instrument  = new BLL.CCOM.Musical_instrument();
                totalCount              = bll_musical_instrument.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_musical_instrument.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "6":
                bll_degree = new BLL.CCOM.Degree();
                totalCount = bll_degree.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_degree.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            case "7":
                bll_certivicate_type    = new BLL.CCOM.Certificate_type();
                totalCount              = bll_certivicate_type.GetRecordCount(_strWhere);
                this.rptList.DataSource = bll_certivicate_type.GetListByPage(_strWhere, _order, start_index, end_index);
                break;

            default:
                break;
            }
            this.rptList.DataBind();
            //绑定页码
            txtPageNum.Text = pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("ResourceList.aspx", "fun_id={0}&keywords={1}&page={2}&selectid={3}", DESEncrypt.Encrypt(this.fun_id), keywords, "__id__", this.ddlResourceType.SelectedValue);

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);
        }
Ejemplo n.º 11
0
        public String GetResourseName(String signId)
        {
            switch (this.ddlResourceType.SelectedValue)
            {
            case "1":
                Model.CCOM.Province model_province = new BLL.CCOM.Province().GetModel(" Province_id=" + signId);
                if (model_province != null)
                {
                    return(model_province.Province_name);
                }
                return("");

            case "2":
                Model.CCOM.Politics model_politics = new BLL.CCOM.Politics().GetModel(" Politics_id=" + signId);
                if (model_politics != null)
                {
                    return(model_politics.Politics_name);
                }
                return("");

            case "3":
                Model.CCOM.Nationality model_nationality = new BLL.CCOM.Nationality().GetModel(" Nationality_id=" + signId);
                if (model_nationality != null)
                {
                    return(model_nationality.Nationality_name);
                }
                return("");

            case "4":
                Model.CCOM.Nation model_nation = new BLL.CCOM.Nation().GetModel(" Nation_id=" + signId);
                if (model_nation != null)
                {
                    return(model_nation.Nation_name);
                }
                return("");

            case "5":
                Model.CCOM.Musical_instrument model_musical_instrument = new BLL.CCOM.Musical_instrument().GetModel(" Mi_id=" + signId);
                if (model_musical_instrument != null)
                {
                    return(model_musical_instrument.Mi_name);
                }
                return("");

            case "6":
                Model.CCOM.Degree model_degree = new BLL.CCOM.Degree().GetModel(" Degree_id=" + signId);
                if (model_degree != null)
                {
                    return(model_degree.Degree_name);
                }
                return("");

            case "7":
                Model.CCOM.Certificate_type model_certificate_type = new BLL.CCOM.Certificate_type().GetModel(" Ct_id=" + signId);
                if (model_certificate_type != null)
                {
                    return(model_certificate_type.Ct_name);
                }
                return("");

            default:
                return("");
            }
        }
Ejemplo n.º 12
0
        //删除
        protected void lbtSingleDelete_Click(object sender, EventArgs e)
        {
            var lbtn = sender as LinkButton;

            if (lbtn != null)
            {
                var  id     = Int32.Parse(DESEncrypt.Decrypt(lbtn.ToolTip.ToString()));
                bool result = true;
                try
                {
                    switch (this.ddlResourceType.SelectedValue)
                    {
                    case "1":
                        bll_province = new BLL.CCOM.Province();
                        result       = bll_province.Delete(id);
                        break;

                    case "2":
                        bll_politics = new BLL.CCOM.Politics();
                        result       = bll_politics.Delete(id);
                        break;

                    case "3":
                        bll_nationality = new BLL.CCOM.Nationality();
                        result          = bll_nationality.Delete(id);
                        break;

                    case "4":
                        bll_nation = new BLL.CCOM.Nation();
                        result     = bll_nation.Delete(id);
                        break;

                    case "5":
                        bll_musical_instrument = new BLL.CCOM.Musical_instrument();
                        result = bll_musical_instrument.Delete(id);
                        break;

                    case "6":
                        bll_degree = new BLL.CCOM.Degree();
                        result     = bll_degree.Delete(id);
                        break;

                    case "7":
                        bll_certivicate_type = new BLL.CCOM.Certificate_type();
                        result = bll_certivicate_type.Delete(id);
                        break;

                    default:
                        break;
                    }
                }
                catch
                {
                    result = false;
                }
                string keywords = this.keywordTab0;
                int    page     = MyRequest.GetQueryInt("page", 1);
                if (result == true)
                {
                    JscriptMsg("删除成功!", Utils.CombUrlTxt("ResourceList.aspx", "fun_id={0}&keywords={1}&page={2}&selectid={3}",
                                                         DESEncrypt.Encrypt(this.fun_id), keywords, page.ToString(), this.ddlResourceType.SelectedValue), "Success");
                }
                else
                {
                    JscriptMsg("删除失败!", Utils.CombUrlTxt("ResourceList.aspx", "fun_id={0}&keywords={1}&page={2}&selectid={3}",
                                                         DESEncrypt.Encrypt(this.fun_id), keywords, page.ToString(), this.ddlResourceType.SelectedValue), "Error");
                }
            }
        }
        private void bindData()
        {
            long _id = GetAdminInfo_CCOM().User_id;

            if (_id > 0)
            {
                Model.CCOM.User_infomation user_model = new BLL.CCOM.User_infomation().GetModel(_id);
                if ((int)user_model.User_type != 1)
                {
                    JscriptMsg("只有考生才有打印报名表功能", "/AdminMetro/index.aspx", "Error");
                    return;
                }
                Model.CCOM.User_property property_model = new BLL.CCOM.User_property().GetModel(" User_id=" + _id);

                try
                {
                    int period = int.Parse(new BLL.CCOM.Period().GetModel(property_model.Period_id).Period_year);
                    this.title.Text = "中央音乐学院" + period + "年本科招生专业考试报名表";
                }
                catch
                {
                    JscriptMsg("考生信息出错", "/AdminMetro/index.aspx", "Error");
                    //Response.Redirect("");
                }

                if (user_model != null && property_model != null)
                {
                    this.name.Text      = user_model.User_realname;
                    this.id_number.Text = user_model.User_ID_number;
                    if (user_model.User_gender != null && (bool)user_model.User_gender)
                    {
                        this.gender.Text = "女";
                    }
                    else
                    {
                        this.gender.Text = "男";
                    }
                    if (user_model.User_birthday != null)
                    {
                        this.birthday.Text = ((DateTime)user_model.User_birthday).ToString("yyyyMMdd");
                    }
                    else
                    {
                        JscriptMsg("出生日期信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }

                    var nation_model = new BLL.CCOM.Nationality().GetModel(property_model.UP_nationality);
                    if (nation_model != null)
                    {
                        this.nation.Text = nation_model.Nationality_name;
                    }
                    else
                    {
                        JscriptMsg("民族不存在", "/AdminMetro/index.aspx", "Error");
                        return;
                    }


                    var province_model = new BLL.CCOM.Province().GetModel(property_model.UP_province);
                    if (province_model != null)
                    {
                        this.birth_place.Text  = province_model.Province_name;
                        this.stu_province.Text = province_model.Province_name;
                    }
                    else
                    {
                        JscriptMsg("省份不存在,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }

                    if (property_model.UP_high_school != null)
                    {
                        this.file_address.Text = property_model.UP_high_school;
                    }
                    else
                    {
                        JscriptMsg("高中院校信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }


                    var politics_model = new BLL.CCOM.Politics().GetModel(property_model.UP_politics);
                    if (politics_model != null)
                    {
                        this.politics.Text = politics_model.Politics_name;
                    }
                    else
                    {
                        JscriptMsg("政治面貌不存在,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }

                    if (property_model.UP_picture != null)
                    {
                        this.head_pic.Src = property_model.UP_picture;
                    }
                    else
                    {
                        JscriptMsg("证件照信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }



                    var agency_model = new BLL.CCOM.Agency().GetModel(property_model.Agency_id);
                    if (agency_model != null)
                    {
                        this.major.Text = agency_model.Agency_name;
                    }
                    else
                    {
                        JscriptMsg("专业不存在,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }

                    this.entrance_exam_number.Text = property_model.UP_CCOM_number;
                    this.stu_entrance_number.Text  = property_model.UP_CCOM_number;

                    if (property_model.UP_receiver_phone != null)
                    {
                        this.exam_phone.Text     = property_model.UP_receiver_phone;
                        this.reciever_phone.Text = property_model.UP_receiver_phone;
                    }
                    else
                    {
                        JscriptMsg("联系电话信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }
                    if (property_model.UP_address != null)
                    {
                        this.admit_address.Text = property_model.UP_address;
                    }
                    else
                    {
                        JscriptMsg("录取通知书邮寄地址信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }
                    if (property_model.UP_postal_code != null)
                    {
                        this.city_id.Text = property_model.UP_postal_code;
                    }
                    else
                    {
                        JscriptMsg("邮编信息不全,请先完善信息再行打印", "/AdminMetro/index.aspx", "Error");
                        return;
                    }
                    this.reciever.Text = user_model.User_realname;
                    this.stu_name.Text = user_model.User_realname;
                }
                else
                {
                    JscriptMsg("考生不存在", "/AdminMetro/index.aspx", "Error");
                    return;
                }

                //获取报考科目
                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);
                    }
                }
                StringBuilder      sb        = new StringBuilder();
                Model.CCOM.Subject sub_model = null;
                int flag = 0;
                for (int i = 0; i < sub.Count; i++)
                {
                    sub_model = sub_bll.GetModel(sub[i]);
                    if (sub_model != null)
                    {
                        if (flag == 1)
                        {
                            flag = 0;
                            continue;
                        }
                        if (sub_model.Value_type == 1 && flag == 0)
                        {
                            flag = 1;
                        }
                        sb.Append("<div class=\"control-group\" style=\"margin-top:5px;\"><div class=\"line\">");
                        sb.Append("<div class=\"course_name\">");
                        sb.Append("<span>");
                        sb.Append(sub_model.Subject_title);
                        sb.Append("</span>");
                        sb.Append("</div>");
                        sb.Append("<div class=\"exam_form\">");
                        sb.Append("<span>");
                        if (sub_model.Subject_type != null && (bool)sub_model.Subject_type)
                        {
                            sb.Append("面试");
                        }
                        else
                        {
                            sb.Append("笔试");
                        }
                        sb.Append("</span>");
                        sb.Append("</div>");


                        Label chapter = newChapterLabel(_id, sub[i]);
                        sb.Append("<div class=\"exam_song\">");
                        sb.Append(chapter.Text.ToString());
                        sb.Append("</div>");

                        sb.Append("</div></div><br>");
                        //sb.Append("<div class=\"line_decration\"></div>");
                    }
                }
                this.examination_course.InnerHtml = sb.ToString();
            }
        }
Ejemplo n.º 14
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            String select = this.ddlResourceType.SelectedValue;
            String name   = this.nameText.Text;

            if (name == "")
            {
                JscriptMsg("资源名称不能为空!", "", "Error");
                return;
            }
            if (select == "")
            {
                JscriptMsg("资源类型不能为空!", "", "Error");
                return;
            }
            if (Tools.CheckParams(name + select))
            {
                JscriptMsg("输入参数不合法!", "", "Error");
                return;
            }
            if (action == MyEnums.ActionEnum.Edit.ToString()) //修改
            {
                if (signId != 0)
                {
                    string pageUrl = Utils.CombUrlTxt("ResourceList.aspx", "fun_id={0}&selectid={1}",
                                                      DESEncrypt.Encrypt(this.fun_id), selectid);
                    switch (select)
                    {
                    case "1":
                        Model.CCOM.Province model_province = new BLL.CCOM.Province().GetModel(" Province_id=" + signId);
                        if (model_province != null)
                        {
                            model_province.Province_name = name;
                            if (new BLL.CCOM.Province().GetModel(" Province_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Province().Update(model_province))
                            {
                                JscriptMsg("生源地编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,生源地编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "2":
                        Model.CCOM.Politics model_politics = new BLL.CCOM.Politics().GetModel(" Politics_id=" + signId);
                        if (model_politics != null)
                        {
                            model_politics.Politics_name = name;
                            if (new BLL.CCOM.Politics().GetModel(" Politics_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Politics().Update(model_politics))
                            {
                                JscriptMsg("政治面貌编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,政治面貌编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "3":
                        Model.CCOM.Nationality model_nationality = new BLL.CCOM.Nationality().GetModel(" Nationality_id=" + signId);
                        if (model_nationality != null)
                        {
                            model_nationality.Nationality_name = name;
                            if (new BLL.CCOM.Nationality().GetModel(" Nationality_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Nationality().Update(model_nationality))
                            {
                                JscriptMsg("民族编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,民族编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "4":
                        Model.CCOM.Nation model_nation = new BLL.CCOM.Nation().GetModel(" Nation_id=" + signId);
                        if (model_nation != null)
                        {
                            model_nation.Nation_name = name;
                            if (new BLL.CCOM.Nation().GetModel(" Nation_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Nation().Update(model_nation))
                            {
                                JscriptMsg("国籍编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,国籍编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "5":
                        Model.CCOM.Musical_instrument model_musical_instrument = new BLL.CCOM.Musical_instrument().GetModel(" Mi_id=" + signId);
                        if (model_musical_instrument != null)
                        {
                            model_musical_instrument.Mi_name = name;
                            if (new BLL.CCOM.Musical_instrument().GetModel(" Mi_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Musical_instrument().Update(model_musical_instrument))
                            {
                                JscriptMsg("乐器编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,乐器编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "6":
                        Model.CCOM.Degree model_degree = new BLL.CCOM.Degree().GetModel(" Degree_id=" + signId);
                        if (model_degree != null)
                        {
                            model_degree.Degree_name = name;
                            if (new BLL.CCOM.Degree().GetModel(" Degree_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Degree().Update(model_degree))
                            {
                                JscriptMsg("教育程度编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,教育程度编辑失败!", "", "Error");
                            }
                        }
                        break;

                    case "7":
                        Model.CCOM.Certificate_type model_certificate_type = new BLL.CCOM.Certificate_type().GetModel(" Ct_id=" + signId);
                        if (model_certificate_type != null)
                        {
                            model_certificate_type.Ct_name = name;
                            if (new BLL.CCOM.Certificate_type().GetModel(" Ct_name='" + name + "'") != null)
                            {
                                JscriptMsg("系统中已有该资源!", "", "Error");
                            }
                            else if (new BLL.CCOM.Certificate_type().Update(model_certificate_type))
                            {
                                JscriptMsg("证件类型编辑成功!^_^", pageUrl, "Success");
                            }
                            else
                            {
                                JscriptMsg("出现异常,证件类型编辑失败!", "", "Error");
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
            }
            else
            {
                //add
                string pageUrl = Utils.CombUrlTxt("ResourceList.aspx", "fun_id={0}&selectid={1}", DESEncrypt.Encrypt(this.fun_id), select);
                int    id      = 0;
                switch (select)
                {
                case "1":
                    Model.CCOM.Province model_province = new Model.CCOM.Province();
                    model_province.Province_name = name;
                    if (new BLL.CCOM.Province().GetModel(" Province_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Province().Add(model_province);
                    }
                    break;

                case "2":
                    Model.CCOM.Politics model_politics = new Model.CCOM.Politics();
                    model_politics.Politics_name = name;
                    if (new BLL.CCOM.Politics().GetModel(" Politics_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Politics().Add(model_politics);
                    }
                    break;

                case "3":
                    Model.CCOM.Nationality model_nationality = new Model.CCOM.Nationality();
                    model_nationality.Nationality_name = name;
                    if (new BLL.CCOM.Nationality().GetModel(" Nationality_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Nationality().Add(model_nationality);
                    }
                    break;

                case "4":
                    Model.CCOM.Nation model_nation = new Model.CCOM.Nation();
                    model_nation.Nation_name = name;
                    if (new BLL.CCOM.Nation().GetModel(" Nation_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Nation().Add(model_nation);
                    }
                    break;

                case "5":
                    Model.CCOM.Musical_instrument model_musical_instrument = new Model.CCOM.Musical_instrument();
                    model_musical_instrument.Mi_name = name;
                    if (new BLL.CCOM.Musical_instrument().GetModel(" Mi_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Musical_instrument().Add(model_musical_instrument);
                    }
                    break;

                case "6":
                    Model.CCOM.Degree model_degree = new Model.CCOM.Degree();
                    model_degree.Degree_name = name;
                    if (new BLL.CCOM.Degree().GetModel(" Degree_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Degree().Add(model_degree);
                    }
                    break;

                case "7":
                    Model.CCOM.Certificate_type model_certificate_type = new Model.CCOM.Certificate_type();
                    model_certificate_type.Ct_name = name;
                    if (new BLL.CCOM.Certificate_type().GetModel(" Ct_name='" + name + "'") != null)
                    {
                        id = -100;
                    }
                    else
                    {
                        id = new BLL.CCOM.Certificate_type().Add(model_certificate_type);
                    }
                    break;

                default:
                    break;
                }
                if (id > 0)
                {
                    JscriptMsg("添加资源成功!^_^", pageUrl, "Success");
                }
                else if (id == -100)
                {
                    JscriptMsg("系统中已有该资源!", "", "Error");
                }
                else
                {
                    JscriptMsg("出现异常,添加资源失败!", "", "Error");
                }
            }
        }
Ejemplo n.º 15
0
        protected void BindSignInfo(long signId)
        {
            this.ddlResourceType.SelectedValue = selectid;
            switch (this.selectid)
            {
            case "1":
                Model.CCOM.Province model_province = new BLL.CCOM.Province().GetModel(" Province_id=" + signId);
                if (model_province != null)
                {
                    this.nameText.Text = model_province.Province_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "2":
                Model.CCOM.Politics model_politics = new BLL.CCOM.Politics().GetModel(" Politics_id=" + signId);
                if (model_politics != null)
                {
                    this.nameText.Text = model_politics.Politics_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "3":
                Model.CCOM.Nationality model_nationality = new BLL.CCOM.Nationality().GetModel(" Nationality_id=" + signId);
                if (model_nationality != null)
                {
                    this.nameText.Text = model_nationality.Nationality_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "4":
                Model.CCOM.Nation model_nation = new BLL.CCOM.Nation().GetModel(" Nation_id=" + signId);
                if (model_nation != null)
                {
                    this.nameText.Text = model_nation.Nation_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "5":
                Model.CCOM.Musical_instrument model_musical_instrument = new BLL.CCOM.Musical_instrument().GetModel(" Mi_id=" + signId);
                if (model_musical_instrument != null)
                {
                    this.nameText.Text = model_musical_instrument.Mi_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "6":
                Model.CCOM.Degree model_degree = new BLL.CCOM.Degree().GetModel(" Degree_id=" + signId);
                if (model_degree != null)
                {
                    this.nameText.Text = model_degree.Degree_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            case "7":
                Model.CCOM.Certificate_type model_certificate_type = new BLL.CCOM.Certificate_type().GetModel(" Ct_id=" + signId);
                if (model_certificate_type != null)
                {
                    this.nameText.Text = model_certificate_type.Ct_name;
                }
                else
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 如果某省市没有设定分数线,那么用北京的分数线进行折算
        /// </summary>
        /// <returns>成功返回true</returns>
        public bool calculateFenShuXian()
        {
            var bll     = new BLL.CCOM.Fractional_line();
            var modelBJ = bll.GetModelList("Fl_Province in (select Province_id from Province where Province_name = '北京市') and Period_id = " + period_id);

            if (modelBJ != null && modelBJ.Count > 0)
            {
                var BeiJingXian  = modelBJ[0];
                var provinceList = new BLL.CCOM.Province().GetModelList("");
                foreach (var province in provinceList)
                {
                    var model = bll.GetModelList("Fl_Province = " + province.Province_id + " and Period_id = " + period_id);
                    if (model != null && model.Count > 0)
                    {
                        ///先算三本线
                        //理科
                        if (model[0].LiKeSanBen.ToString() == "0")
                        {
                            if (model[0].LiKeErBen.ToString() != "0")
                            {
                                model[0].LiKeSanBen = BeiJingXian.LiKeSanBen * model[0].LiKeErBen / BeiJingXian.LiKeErBen;
                            }
                            else if (model[0].LiKeYiBen.ToString() != "0")
                            {
                                model[0].LiKeSanBen = BeiJingXian.LiKeSanBen * model[0].LiKeYiBen / BeiJingXian.LiKeYiBen;
                            }
                        }
                        //文科
                        if (model[0].WenKeSanBen.ToString() == "0")
                        {
                            if (model[0].WenKeErBen.ToString() != "0")
                            {
                                model[0].WenKeSanBen = BeiJingXian.WenKeSanBen * model[0].WenKeErBen / BeiJingXian.WenKeErBen;
                            }
                            else if (model[0].WenKeYiBen.ToString() != "0")
                            {
                                model[0].WenKeSanBen = BeiJingXian.WenKeSanBen * model[0].WenKeYiBen / BeiJingXian.WenKeYiBen;
                            }
                        }

                        ///再算艺术线
                        //理科
                        if (model[0].LiKeYiShuXian.ToString() == "0")
                        {
                            if (model[0].LiKeSanBen.ToString() != "0")
                            {
                                model[0].LiKeYiShuXian = BeiJingXian.LiKeYiShuXian * model[0].LiKeSanBen / BeiJingXian.LiKeSanBen;
                            }
                        }
                        //文科
                        if (model[0].WenKeYiShuXian.ToString() == "0")
                        {
                            if (model[0].WenKeSanBen.ToString() != "0")
                            {
                                model[0].WenKeYiShuXian = BeiJingXian.WenKeYiShuXian * model[0].WenKeSanBen / BeiJingXian.WenKeSanBen;
                            }
                        }

                        bll.Update(model[0]);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 17
0
        protected string ImportDataItem(DataSet ds, ref int success, ref int error)//基础数据
        {
            string result = "";

            BLL.CCOM.Province             bll_Province             = new BLL.CCOM.Province();
            Model.CCOM.Province           model_Province           = new Model.CCOM.Province();
            BLL.CCOM.Politics             bll_Politics             = new BLL.CCOM.Politics();
            Model.CCOM.Politics           model_Politics           = new Model.CCOM.Politics();
            BLL.CCOM.Nationality          bll_Nationality          = new BLL.CCOM.Nationality();
            Model.CCOM.Nationality        model_Nationality        = new Model.CCOM.Nationality();
            BLL.CCOM.Nation               bll_Nation               = new BLL.CCOM.Nation();
            Model.CCOM.Nation             model_Nation             = new Model.CCOM.Nation();
            BLL.CCOM.Musical_instrument   bll_Musical_instrument   = new BLL.CCOM.Musical_instrument();
            Model.CCOM.Musical_instrument model_Musical_instrument = new Model.CCOM.Musical_instrument();
            BLL.CCOM.Degree               bll_Degree               = new BLL.CCOM.Degree();
            Model.CCOM.Degree             model_Degree             = new Model.CCOM.Degree();
            BLL.CCOM.Certificate_type     bll_Certificate_type     = new BLL.CCOM.Certificate_type();
            Model.CCOM.Certificate_type   model_Certificate_type   = new Model.CCOM.Certificate_type();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string checkmsg = null;
                string name     = ds.Tables[0].Rows[i]["名称"].ToString().Trim();
                if (!ValidDFValue(name, true, "", ref checkmsg))
                {
                    result += "×第" + (i + 1).ToString() + "行数据更新失败,名称" + checkmsg + "<br/>";
                    error++;
                    continue;
                }
                switch (this.ddlResourceType.SelectedValue)
                {
                case "1":
                    if (name != "")
                    {
                        model_Province.Province_name = name;
                    }
                    if (bll_Province.GetModel(" Province_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Province.Add(model_Province) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "2":
                    if (name != "")
                    {
                        model_Politics.Politics_name = name;
                    }
                    if (bll_Politics.GetModel(" Politics_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Politics.Add(model_Politics) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "3":
                    if (name != "")
                    {
                        model_Nationality.Nationality_name = name;
                    }
                    if (bll_Nationality.GetModel(" Nationality_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Nationality.Add(model_Nationality) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "4":
                    if (name != "")
                    {
                        model_Nation.Nation_name = name;
                    }
                    if (bll_Nation.GetModel(" Nation_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Nation.Add(model_Nation) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "5":
                    if (name != "")
                    {
                        model_Musical_instrument.Mi_name = name;
                    }
                    if (bll_Musical_instrument.GetModel(" Mi_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Musical_instrument.Add(model_Musical_instrument) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "6":
                    if (name != "")
                    {
                        model_Degree.Degree_name = name;
                    }
                    if (bll_Degree.GetModel(" Degree_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Degree.Add(model_Degree) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                case "7":
                    if (name != "")
                    {
                        model_Certificate_type.Ct_name = name;
                    }
                    if (bll_Certificate_type.GetModel(" Ct_name='" + name + "'") != null)
                    {
                        result += "×第" + (i + 1).ToString() + "行,系统已存在该数据<br/>";
                        error++;
                        continue;
                    }
                    else if (bll_Certificate_type.Add(model_Certificate_type) == 0)
                    {
                        result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>";
                        error++;
                        continue;
                    }
                    else
                    {
                        success++;
                    }
                    break;

                default:
                    break;
                }
            }
            return(result);
        }