public bool addPreliminary(string major, string subject_id) { try { string strWhere = " Major_id=" + major + " AND Period_id=" + this.period_id; BLL.CCOM.Exam_firstin_subject bll = new BLL.CCOM.Exam_firstin_subject(); var model = bll.GetModel(strWhere); var _model = new Model.CCOM.Exam_firstin_subject(); if (model == null) { _model.Esn_id = Convert.ToInt32(subject_id); _model.Major_id = Convert.ToInt32(major); _model.Period_id = this.period_id; bll.Add(_model); } else { model.Esn_id = Convert.ToInt32(subject_id); bll.Update(model); } return(true); } catch { JscriptMsg("数据出错", "", "Error"); return(false); } }
protected void ddlMajor_SelectedIndexChanged(object sender, EventArgs e) { string str1 = " Agency_id=" + major_id + " AND Period_id=" + period_id + " AND UP_calculation_status > 1"; var model1 = new BLL.CCOM.User_property().GetModelList(str1); if (model1.Count > 0) { hasPrelimary = false; } this.SetFirstIn.Enabled = hasPrelimary; this.btnCalculation.Enabled = hasPrelimary; string order = ""; string strWhere = " Major_id=" + major_id + " AND Period_id=" + period_id; BLL.CCOM.Exam_firstin_subject bll = new BLL.CCOM.Exam_firstin_subject(); var epsmodel = bll.GetModel(strWhere); if (epsmodel != null) { int Esn_id = epsmodel.Esn_id; subList = new BLL.CCOM.Subject().GetModelList(" Fs_id=" + Esn_id); count = subList.Count; } order = "Efss_score DESC, Efss_sequence DESC ,UP_CCOM_number asc"; strWhere = CombSqlTxt(this.keywords); try { RptBind(strWhere, order); } catch { JscriptMsg("获取考生成绩出错", "", "Error"); } }