コード例 #1
0
        //�ж��������Ƿ��Ѵ���
        protected bool IsCode(string code)
        {
            LabMS.BLL.EvaluationTitle title = new LabMS.BLL.EvaluationTitle();
            List<LabMS.Model.EvaluationTitle> list = new List<LabMS.Model.EvaluationTitle>();

            if (ViewState["ID"] != null)
            {
                list = title.GetModelList("Title_Code='" + code + "' and [ID]<>" + int.Parse(ViewState["ID"].ToString()));
            }
            else
            {
                list = title.GetModelList("Title_Code='" + code + "'");
            }
            if (list.Count == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
コード例 #2
0
        //绑定主题
        protected void TitleDropDownList(int code)
        {
            LabMS.BLL.EvaluationTitle evalTitle = new LabMS.BLL.EvaluationTitle();
            List<LabMS.Model.EvaluationTitle> evalTitleModel = new List<LabMS.Model.EvaluationTitle>();

            evalTitleModel = evalTitle.GetModelList("Title_Category=" + code);
            TitleDDL.DataSource = evalTitleModel;
            TitleDDL.DataBind();
        }
コード例 #3
0
        //��gridview
        protected void EvalTitleGV_DataBind(int Code)
        {
            LabMS.BLL.EvaluationTitle EvalTitle = new LabMS.BLL.EvaluationTitle();
            List<LabMS.Model.EvaluationTitle> EvalTitleModel = new List<LabMS.Model.EvaluationTitle>();

            EvalTitleModel = EvalTitle.GetModelList("Title_Category=" + Code+" order by [ID] DESC");
            EvalTitleGridView.DataSource = EvalTitleModel;
            EvalTitleGridView.DataBind();
        }