Exemplo n.º 1
0
        /// <summary>
        /// �������б����а�
        /// </summary>
        protected void DataBinds()
        {
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> lsLab = new List<LabMS.Model.Lab>();

            lsLab = Lab.GetModelList("");
            if (lsLab.Count != 0)
            {

                ddl_Lab.DataSource = lsLab;
                ddl_Lab.DataTextField = "Lab_Name";
                ddl_Lab.DataValueField = "ID";
                ddl_Lab.DataBind();
                ddl_Lab.Items.Insert(0, new ListItem("--��ѡ��--", "0"));
            }

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();

            LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();
            if (DicClass.GetModelList("Code='Project_Category'").Count != 0)
            {
                Ds = DicClass.GetModelList("Code='Project_Category'")[0];
                lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
                ddl_LabType.DataSource = lsDic;
                ddl_LabType.DataTextField = "Name";
                ddl_LabType.DataValueField = "Code";
                ddl_LabType.DataBind();
                ddl_LabType.Items.Insert(0, new ListItem("--��ѡ��--", "0"));
            }
        }
Exemplo n.º 2
0
        protected void DataBinds()
        {
            LabMS.Model.Course model = new LabMS.Model.Course();
            LabMS.BLL.Course Course = new LabMS.BLL.Course();

            model = Course.GetModel(Convert.ToInt32(QueryString));
            tb_CourseCode.Text = model.Course_Code;
            tb_CourseName.Text = model.Course_Name;
            tb_ExpHouse.Text = model.Course_ExprientHouse.ToString();
            tb_EngName.Text = model.EnglishName;

            //
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();

            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();

            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();

            List<LabMS.Model.DictionaryClass> lsDic = new List<LabMS.Model.DictionaryClass>();

            lsDic = DicClass.GetModelList("Code='CourseType'");
            if (lsDic.Count != 0)
            {
                ds = lsDic[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_CourseType.DataSource = ls;
                ddl_CourseType.DataTextField = "Name";
                ddl_CourseType.DataValueField = "Code";
                ddl_CourseType.DataBind();
            }
        }
Exemplo n.º 3
0
 protected void DataBinds()
 {
     LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
     List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
     ls = Dic.GetModelList(CombineStr());
     Gv_Equip.DataSource = ls;
     Gv_Equip.DataBind();
 }
Exemplo n.º 4
0
        //�������ֵ� ����List
        protected List<LabMS.Model.Dictionary> DictionaryDropdownlist(string code)
        {
            string strwhere = "DClass='" + code+"'";
            LabMS.BLL.Dictionary dic = new LabMS.BLL.Dictionary();

            List<LabMS.Model.Dictionary> list = new List<LabMS.Model.Dictionary>();
            list = dic.GetModelList(strwhere);
            return list;
        }
Exemplo n.º 5
0
 /// <summary>
 /// 初始化性别下拉框绑定
 /// </summary>
 protected void InitBindDDl()
 {
     LabMS.BLL.Dictionary bd = new LabMS.BLL.Dictionary();
     string str = "DClass='201'";
     ddlSex.DataSource = bd.GetModelList(str);
     ddlSex.DataValueField = "Code";
     ddlSex.DataTextField = "Name";
     ddlSex.DataBind();
 }
Exemplo n.º 6
0
        protected void DataBinds()
        {
            LabMS.BLL.TeachingReform Reform = new LabMS.BLL.TeachingReform();
            LabMS.Model.TeachingReform model = Reform.GetModel(Convert.ToInt32( QueryString));

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();

            if (DicClass.GetModelList("Code='TeachingReform'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='TeachingReform'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (ls.Count != 0)
                {
                    ddl_ProjectType.DataSource = ls;
                    ddl_ProjectType.DataTextField = "Name";
                    ddl_ProjectType.DataValueField = "Code";
                    ddl_ProjectType.DataBind();
                    if (!string.IsNullOrEmpty(model.Teach_DocType))
                    {
                        ddl_ProjectType.Items.FindByValue(model.Teach_DocType).Selected = true;
                    }
                }
            }

            tb_Addres.Text = model.Teach_Address;
            tb_Email.Text = model.Teach_Mail;
            tb_InCharge.Text = model.Teach_InCharge;
            tb_Phone.Text = model.Teach_Phone;
            tb_UnitName.Text = model.Teach_UnitName;
            tb_ProjectName.Text = model.Teach_ProjectName;

            if (DicClass.GetModelList("Code='UnitType'").Count > 0)
            {
                ds = DicClass.GetModelList("Code='UnitType'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (ls.Count > 0)
                {
                    rbl_UnitType.DataSource = ls;
                    rbl_UnitType.DataTextField = "Name";
                    rbl_UnitType.DataValueField = "Code";
                    rbl_UnitType.DataBind();
                    if (!string.IsNullOrEmpty(model.Teach_UnitType))
                    {
                        rbl_UnitType.Items.FindByValue(model.Teach_UnitType).Selected = true;
                    }
                }
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 年级绑定
        /// </summary>
        protected void BindDDl()
        {
            //ExtendBLL.SysSetting ES = new ExtendBLL.SysSetting();
            //int Year = ES.GetCurrentSetting().CurrentYear;
            //int S =int.Parse(ES.GetCurrentSetting().CurrentSemester.Value.ToString());
            //ddlClass.DataSource=Common.GradeHelper.GetCurrentGrade(Year,S,false);
            //ddlClass.DataBind();

            //从字典中取值,入学年份
            LabMS.BLL.Dictionary bDictionary = new LabMS.BLL.Dictionary();
            string str = "DClass='ruxuenianfen'";
            ddlClass.DataSource=bDictionary.GetModelList(str);
            ddlClass.DataTextField = "Name";
            ddlClass.DataValueField = "Code";
            ddlClass.DataBind();
        }
Exemplo n.º 8
0
        protected void DataBinds()
        {
            App_ProjectCode.Text = GetUniqueString();
            LabMS.BLL.DictionaryClass DClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            LabMS.Model.DictionaryClass Ds1 = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> lsLabType = new List<LabMS.Model.Dictionary>();
            List<LabMS.Model.Dictionary> lsConType =new List<LabMS.Model.Dictionary>();
            List<LabMS.Model.Dictionary> lsLabState = new List<LabMS.Model.Dictionary>();

            Ds1 = DClass.GetModelList("Code = 'App_LabType'")[0];
            lsLabType = Dic.GetModelList(" DClass = '"+Ds1.Code+"'");

            Ds1=DClass.GetModelList("Code='App_ConstructionType'")[0];
            lsConType = Dic.GetModelList(" DClass='" + Ds1.Code + "'");

            App_LabType.DataSource = lsLabType;
            App_LabType.DataTextField = "Name";
            App_LabType.DataValueField = "Code";
            App_LabType.DataBind();
            App_LabType.Items.Insert(0, new ListItem("--��ѡ��һ��ѡ��--", "0"));

            App_ConstructionType.DataSource = lsConType;
            App_ConstructionType.DataTextField = "Name";
            App_ConstructionType.DataValueField = "Code";
            App_ConstructionType.DataBind();
            App_ConstructionType.Items.Insert(0, (new ListItem("ѡ��һ��ѡ��", "0")));

            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                App_LabName.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        App_LabName.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }
            App_LabName.Items.Insert(0, new ListItem("--��ѡ��--", "0"));
        }
Exemplo n.º 9
0
        /// <summary>
        /// �������б����а�
        /// </summary>
        protected void DataBinds()
        {
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> lsLab = Lab.GetModelList("");
            ddl_Lab.Items.Clear();

            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            if (ParentLab.Count != 0)
            {
                for (int i = 0; i < ParentLab.Count; i++)
                {
                    ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                    for (int j = 0; j < SonLab.Count; j++)
                    {
                        if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                        {
                            ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                        }
                    }
                }
                ddl_Lab.Items.Insert(0, new ListItem("--����ʵ����--", "0"));
            }
            else
            {
                ddl_Lab.Items.Add(new ListItem("--��ʱû��ʵ����--", "0"));
            }

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();

            LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();
            if (DicClass.GetModelList("Code='Project_Category'").Count != 0)
            {
                Ds = DicClass.GetModelList("Code='Project_Category'")[0];
                lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
                ddl_LabType.DataSource = lsDic;
                ddl_LabType.DataTextField = "Name";
                ddl_LabType.DataValueField = "Code";
                ddl_LabType.DataBind();
                ddl_LabType.Items.Insert(0,new ListItem("--��ѡ��--","0"));
            }
        }
Exemplo n.º 10
0
        /// <summary>
        ///下拉框绑定,从字典里面取值
        ///下拉框绑定,取系统时间前后五年
        /// </summary>
        protected void BindDDl()
        {
            //int CurrentYear = DateTime.Now.Year;
            //for (int i =-5; i <=11; i++)
            //{
            //    int year = CurrentYear + i;
            //    ddlYear.Items.Add(new ListItem(year.ToString(),year.ToString()));
            //}
            //ddlYear.SelectedValue = CurrentYear.ToString();

            LabMS.BLL.Dictionary BDicitonary = new LabMS.BLL.Dictionary();
            ExtendBLL.Dictionary EDictionary = new ExtendBLL.Dictionary();
            ddlYear.DataSource=EDictionary.GetItemListByDClass("ruxuenianfen");
            ddlYear.DataValueField = "Code";
            ddlYear.DataTextField = "Name";
            ddlYear.DataBind();
        }
Exemplo n.º 11
0
        protected void DataBinds()
        {
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }
            ddl_Lab.Items.Insert(0, new ListItem("--��ѡ��--", "0"));

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
            if (DicClass.GetModelList("Code='Conflict'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Conflict'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (ls.Count != 0)
                {
                    rbl_Conflict.DataSource = ls;
                    rbl_Conflict.DataTextField = "Name";
                    rbl_Conflict.DataValueField = "Code";
                    rbl_Conflict.DataBind();
                }

            }

            YearDDL_DataBind();
            Gv_DataBinds();
        }
Exemplo n.º 12
0
        protected void DataBinds()
        {
            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();

            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();
            LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();

            Ds = DicClass.GetModelList("Code= 'TeachingReform'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");

            ddl_ProjectType.DataSource = lsDic;
            ddl_ProjectType.DataValueField = "Code";
            ddl_ProjectType.DataTextField = "Name";
            ddl_ProjectType.DataBind();

            Ds = DicClass.GetModelList("Code='UnitType'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            rbl_UnitType.DataSource = lsDic;
            rbl_UnitType.DataTextField = "Name";
            rbl_UnitType.DataValueField = "Code";
            rbl_UnitType.DataBind();
        }
Exemplo n.º 13
0
 protected void DataBinds()
 {
     LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
     LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
     LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();
     List<LabMS.Model.DictionaryClass> lsDic = new List<LabMS.Model.DictionaryClass>();
     List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
     lsDic = DicClass.GetModelList("Code='CourseType'");
     if (lsDic.Count != 0)
     {
         Ds = lsDic[0];
         ls = Dic.GetModelList("DClass='" + Ds.Code + "'");
         if (ls.Count != 0)
         {
             ddl_CourseType.DataSource = ls;
             ddl_CourseType.DataTextField = "Name";
             ddl_CourseType.DataValueField = "Code";
             ddl_CourseType.DataBind();
             ddl_CourseType.Items.Insert(0, new ListItem("--��ѡ��--", "0"));
         }
     }
     Gv_DataBind();
 }
Exemplo n.º 14
0
        protected void DataBinds()
        {
            #region DataBinds
            int ID = Convert.ToInt32(Request.QueryString["ID"].ToString());
            LabMS.BLL.Project Project = new LabMS.BLL.Project();
            LabMS.Model.Project model = new LabMS.Model.Project();
            model = Project.GetModel(ID);
            //�����ݿ�ʼ

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();

            //ʵ����Ŀ��� Category
            if (DicClass.GetModelList("Code='Project_Category'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_Category'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_Category.DataSource = ls;
                ddl_Category.DataTextField = "Name";
                ddl_Category.DataValueField = "Code";
                ddl_Category.DataBind();
                if (!string.IsNullOrEmpty(model.Project_Category))
                {
                    ddl_Category.Items.FindByValue(model.Project_Category).Selected = true;
                }

            }
            // ʵ������Ŀ Lab

            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }

            if (model.Project_Lab != null)
            {
                ddl_Lab.Items.FindByValue(model.Project_Lab.ToString()).Selected = true;
            }

            if (DicClass.GetModelList("Code='Project_AwardLevel'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_AwardLevel'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_AwardLevel.DataSource = ls;
                ddl_AwardLevel.DataTextField = "Name";
                ddl_AwardLevel.DataValueField = "Code";
                ddl_AwardLevel.DataBind();
                if (!string.IsNullOrEmpty(model.Project_AwardLevel))
                {
                    ddl_AwardLevel.Items.FindByValue(model.Project_AwardLevel).Selected = true;
                }
            }

            //ʵ��������

            if (DicClass.GetModelList("Code='Project_PartnerType'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_PartnerType'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_ParterType.DataSource = ls;
                ddl_ParterType.DataTextField = "Name";
                ddl_ParterType.DataValueField = "Code";
                ddl_ParterType.DataBind();
                if (!string.IsNullOrEmpty(model.Project_PartnerType))
                {
                    ddl_ParterType.Items.FindByValue(model.Project_PartnerType).Selected = true;
                }
            }

            if (DicClass.GetModelList("Code='Project_Type'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_Type'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_Type.DataSource = ls;
                ddl_Type.DataTextField = "Name";
                ddl_Type.DataValueField = "Code";
                ddl_Type.DataBind();
                if (!string.IsNullOrEmpty(model.Project_Type))
                {
                    ddl_Type.Items.FindByValue(model.Project_Type).Selected = true;
                }
            }

            if (DicClass.GetModelList("Code='Project_Request'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_Request'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_Request.DataSource = ls;
                ddl_Request.DataTextField = "Name";
                ddl_Request.DataValueField = "Code";
                ddl_Request.DataBind();
                if (!string.IsNullOrEmpty(model.Project_Request))
                {
                    ddl_Request.Items.FindByValue(model.Project_Request).Selected = true;
                }
            }

            if (DicClass.GetModelList("Code='Project_Change'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_Change'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                ddl_Change.DataSource = ls;
                ddl_Change.DataTextField = "Name";
                ddl_Change.DataValueField = "Code";
                ddl_Change.DataBind();
                if (!string.IsNullOrEmpty(model.Project_Change))
                {
                    ddl_Change.Items.FindByValue(model.Project_Change).Selected = true;
                }
            }

            if (DicClass.GetModelList("Code='Project_CourseMode'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Project_CourseMode'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                cbl_CourseMode.DataSource = ls;
                cbl_CourseMode.DataTextField = "Name";
                cbl_CourseMode.DataValueField = "Code";
                cbl_CourseMode.DataBind();
                string[] cm = model.Project_CourseMode.Split('|');
                foreach (string c in cm)
                {
                    if (!string.IsNullOrEmpty(c.Trim()))
                    {
                        cbl_CourseMode.Items.FindByValue(c.Trim()).Selected = true;
                    }
                }
            }

            // ����רҵ
            LabMS.BLL.Professional Pro = new LabMS.BLL.Professional();
            List<LabMS.Model.Professional> lsPro = new List<LabMS.Model.Professional>();
            lsPro = Pro.GetModelList("");
            if (lsPro.Count != 0)
            {
                ddl_Profess.DataSource = lsPro;
                ddl_Profess.DataTextField = "Pro_Name";
                ddl_Profess.DataValueField = "ID";
                ddl_Profess.DataBind();
                if (model.Project_Professional != null)
                {
                    ddl_Profess.Items.FindByValue(model.Project_Professional.ToString()).Selected = true;
                }
            }

            tb_ClassHourse.Text = model.Project_ClassHourse.ToString();
            tb_Code.Text = model.Project_Code;
            if (model.Project_EndTime != null)
            {
                tb_EndTime.Text = model.Project_EndTime.Value.ToShortDateString();
            }
            tb_EndWeek.Text = model.Project_EndWeek.ToString();
            tb_ExpHouse.Text = model.Project_ExpHouse.ToString();
            tb_Name.Text = model.Project_Name;
            tb_PatnerNum.Text = model.Project_PartnerNum.ToString();
            if (model.Project_StartTime != null)
            {
                tb_StartTime.Text = model.Project_StartTime.Value.ToShortDateString();
            }
            tb_StartWeek.Text = model.Project_StartWeek.ToString();
            tb_Content.Text = model.Project_Content;
            //tb_Subject.Text = model.Project_Subject;

            if (model.Project_Subject != "")
            {
                ls = Dic.GetModelList("Code='" + model.Project_Subject+"'");
                if (ls.Count > 0)
                {
                    tb_Subject.Text = ls[0].Name;
                    tb_SubjectCode.Text = ls[0].Code;
                }
            }
            tb_PerConsume.Text = model.Project_PerConsume.ToString();
            tb_Cunsume.Text = model.Project_Consume.ToString();

            #endregion
        }
Exemplo n.º 15
0
        protected void DataBinds()
        {
            ExtendBLL.ProjectAndOther Project = new ExtendBLL.ProjectAndOther();
            ExtendModule.ProjectAndOther model = new ExtendModule.ProjectAndOther();
            try
            {
                model = Project.GetModelList2("Project.ID=" + querystring.ToString())[0];
                if (model == null)
                {
                    Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>alert('��ѯ�ַ�������');window.location.href='ProjectList.aspx';</script>");
                    return;
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>alert('����ȡ�������г���');window.location.href='ProjectList.aspx';</script>");
                return;
            }

            lb_Code.Text = model.Project_Code;
            lb_Name.Text = model.Project_Name;
            lb_Name.Text = model.Lab_Name;
            lb_Lab.Text = model.Lab_Name;
            lb_StartTime.Text = model.Project_StartTime.Value.ToShortDateString();
            lb_EndTime.Text = model.Project_EndTime.Value.ToShortDateString();
            lb_StartWeek.Text = model.Project_StartWeek.ToString();
            lb_EndWeek.Text = model.Project_EndWeek.ToString();
            lb_ClassHouse.Text = model.Project_ClassHourse.ToString();
            lb_ExpHouse.Text = model.Project_ExpHouse.ToString();
            lb_AwareLevel.Text = model.AwardLevel;
            lb_PartnerType.Text = model.PartnerType;
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> ls = Dic.GetModelList("DClass='Subject'");
            if (ls.Count != 0)
            {
                for (int n = 0; n < ls.Count; n++)
                {
                    if (model.Project_Subject == ls[n].Code)
                    {
                        lb_Subject.Text = ls[n].Name;
                    }
                }
            }

            lb_Type.Text = model.Type;
            lb_Consume.Text = model.Project_Consume.ToString();
            lb_Request.Text = model.Request;
            lb_PerConsume.Text = model.Project_PerConsume.ToString();
            lb_PerNum.Text = model.Project_PartnerNum.ToString();
            lb_TeamNum.Text = model.Project_PartnerTeamNum.ToString();
            lb_Profess.Text = model.Pro_Name;

            lb_Category.Text = model.Category;
            lt_Content.Text = model.Project_Content;

            if (!string.IsNullOrEmpty(model.Project_CourseMode))
            {
                string[] array = model.Project_CourseMode.Split('|');
                if (array[0] != "")
                {
                    LabMS.BLL.Dictionary CourseMode = new LabMS.BLL.Dictionary();
                    List<LabMS.Model.Dictionary> lsdic;
                    LabMS.Model.Dictionary dicmodel;
                    for (int n = 0; n < array.Length; n++)
                    {
                        if (array[n] != "")
                        {
                            lsdic = CourseMode.GetModelList("Code='" + array[n] + "'");
                            if (ls.Count != 0)
                            {
                                dicmodel = lsdic[0];
                                lt_Model.Text += " " + dicmodel.Name;
                            }
                        }
                    }
                }
            }

            tb_ID.Value = querystring.ToString();
        }
Exemplo n.º 16
0
        /// <summary>
        /// 初始化页面赋值
        /// </summary>
        protected void InitBind(int ID)
        {
            string str = "ID="+ID;
            LabMS.BLL.Semester BS = new LabMS.BLL.Semester();
            List<LabMS.Model.Semester> list = new List<LabMS.Model.Semester>();
            list=BS.GetModelList(str);
            ddlYear.SelectedValue = list[0].Year.Value.ToString();
            ddlAcadmic.SelectedValue = list[0].MSemester.Value.ToString();
            tbETime.Text = list[0].ETime.Value.ToShortDateString();
            tbSTime.Text = list[0].STime.Value.ToShortDateString();

            LabMS.BLL.Dictionary BDicitonary = new LabMS.BLL.Dictionary();
            ExtendBLL.Dictionary EDictionary = new ExtendBLL.Dictionary();
            ddlYear.DataSource = EDictionary.GetItemListByDClass("ruxuenianfen");
            ddlYear.DataValueField = "Code";
            ddlYear.DataTextField = "Name";
            ddlYear.DataBind();
            ddlYear.SelectedValue = DateTime.Now.Year.ToString();
        }
Exemplo n.º 17
0
        protected void DataBinds()
        {
            tb_Code.Text = DateTime.Now.ToString("yyyyMMddhhmmss");
            Project_StartTime.Attributes.Add("readonly", "-1");
            Project_EndTime.Attributes.Add("readonly", "-1");

            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> lsLab = Lab.GetModelList("");
            Project_Lab.Items.Clear();

            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            if (ParentLab.Count != 0)
            {
                for (int i = 0; i < ParentLab.Count; i++)
                {
                    Project_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                    for (int j = 0; j < SonLab.Count; j++)
                    {
                        if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                        {
                            Project_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                        }
                    }
                }
                Project_Lab.Items.Insert(0, new ListItem("--��ѡ����Ŀ������ҵ��--", "0"));
            }
            else
            {
                Project_Lab.Items.Add(new ListItem("--��ʱû������ʵ����--", "0"));
            }

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();

            LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();

            if (DicClass.GetModelList("Code='Project_Category'").Count != 0)
            {
                Ds = DicClass.GetModelList("Code='Project_Category'")[0];
                lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
                Project_Category.DataSource = lsDic;
                Project_Category.DataTextField = "Name";
                Project_Category.DataValueField = "Code";
                Project_Category.DataBind();
                Project_Category.Items.Insert(0, new ListItem("--��ѡ��ʵ�����--", "0"));
            }
            else
            {
                Project_Category.Items.Add(new ListItem("--��ʱû��ʵ�����Ϳɹ�ѡ��--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_AwardLevel'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            if (lsDic.Count != 0)
            {
                ddl_AwardLevel.DataSource = lsDic;
                ddl_AwardLevel.DataTextField = "Name";
                ddl_AwardLevel.DataValueField = "Code";
                ddl_AwardLevel.DataBind();
                ddl_AwardLevel.Items.Insert(0, new ListItem("--��ѡ��������--", "0"));
            }
            else
            {
                ddl_AwardLevel.Items.Add(new ListItem("--��ʱû�н��������ɹ�ѡ��--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_PartnerType'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            if (lsDic.Count != 0)
            {
                ddl_ParterType.DataSource = lsDic;
                ddl_ParterType.DataTextField = "Name";
                ddl_ParterType.DataValueField = "Code";
                ddl_ParterType.DataBind();
                ddl_ParterType.Items.Insert(0, new ListItem("--��ѡ��ʵ�������--", "0"));
            }
            else
            {
                ddl_ParterType.Items.Add(new ListItem("--��ʱû��ʵ��������--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_Type'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            if (lsDic.Count != 0)
            {
                ddl_Type.DataSource = lsDic;
                ddl_Type.DataTextField = "Name";
                ddl_Type.DataValueField = "Code";
                ddl_Type.DataBind();
                ddl_Type.Items.Insert(0, new ListItem("--��ѡ��ʵ������--", "0"));
            }
            else
            {
                ddl_Type.Items.Add(new ListItem("--��ʱû��ʵ������--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_Request'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            if (lsDic.Count != 0)
            {
                ddl_Request.DataSource = lsDic;
                ddl_Request.DataTextField = "Name";
                ddl_Request.DataValueField = "Code";
                ddl_Request.DataBind();
                ddl_Request.Items.Insert(0, new ListItem("--��ѡ��ʵ��Ҫ��--", "0"));
            }
            else
            {
                ddl_Request.Items.Add(new ListItem("--��ʱ��ʵ��Ҫ��--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_Change'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            if (lsDic.Count != 0)
            {
                ddl_Change.DataSource = lsDic;
                ddl_Change.DataTextField = "Name";
                ddl_Change.DataValueField = "Code";
                ddl_Change.DataBind();
                ddl_Change.Items.Insert(0, new ListItem("--��ѡ�������--", "0"));
            }
            else
            {
                ddl_Change.Items.Add(new ListItem("--��ʱ������-", "0"));
            }

            LabMS.BLL.Professional Professional = new LabMS.BLL.Professional();
            List<LabMS.Model.Professional> lsPro = new List<LabMS.Model.Professional>();

            lsPro = Professional.GetModelList("");
            if (lsPro.Count != 0)
            {
                ddl_Profess.DataSource = lsPro;
                ddl_Profess.DataTextField = "Pro_Name";
                ddl_Profess.DataValueField = "ID";
                ddl_Profess.DataBind();
                ddl_Profess.Items.Insert(0, new ListItem("--��ѡ��רҵ--", "0"));
            }
            else
            {
                ddl_Profess.Items.Add(new ListItem("--��ʱû��רҵ--", "0"));
            }

            Ds = DicClass.GetModelList("Code='Project_CourseMode'")[0];
            lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
            cbl_CourseMode.DataSource = lsDic;
            cbl_CourseMode.DataValueField = "Code";
            cbl_CourseMode.DataTextField = "Name";
            cbl_CourseMode.DataBind();
        }
Exemplo n.º 18
0
        protected void ControlDataBinds()
        {
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }
            ddl_Lab.Items.Insert(0, new ListItem("--��ѡ��--", "0"));

            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
            ls = Dic.GetModelList("DClass='App_ConstructionType'");
            cbl_ConType.DataSource = ls;
            cbl_ConType.DataTextField = "Name";
            cbl_ConType.DataValueField = "Code";
            cbl_ConType.DataBind();

            List<LabMS.Model.Dictionary> ls2 = new List<LabMS.Model.Dictionary>();
            ls2 = Dic.GetModelList("DClass='App_State'");
            ddl_State.DataSource = ls2;
            ddl_State.DataTextField = "Name";
            ddl_State.DataValueField = "Code";
            ddl_State.DataBind();
            ddl_State.Items.Insert(0, new ListItem("--��ѡ��--", "0"));
        }
Exemplo n.º 19
0
        protected void DataBinds()
        {
            //LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            //List<LabMS.Model.Lab> lsLab = new List<LabMS.Model.Lab>();
            //lsLab = Lab.GetModelList("");
            //ddl_Lab.DataSource = lsLab;
            //ddl_Lab.DataTextField = "Lab_Name";
            //ddl_Lab.DataValueField = "ID";
            //ddl_Lab.DataBind();
            //ddl_Lab.Items.Insert(0, new ListItem("--����ʵ����--", "0"));

            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }
            ddl_Lab.Items.Insert(0, new ListItem("--����ʵ����--", "0"));

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.Model.DictionaryClass Ds = new LabMS.Model.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();

            if (DicClass.GetModelList("Code='App_ConstructionType'").Count != 0)
            {
                Ds = DicClass.GetModelList("Code='App_ConstructionType'")[0];
                lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
                if (lsDic.Count != 0)
                {

                    cbl_ConType.DataSource = lsDic;
                    cbl_ConType.DataTextField = "Name";
                    cbl_ConType.DataValueField = "Code";
                    cbl_ConType.DataBind();
                }
            }
        }
Exemplo n.º 20
0
        protected void DataBinds()
        {
            int QueryID = 0;
            if (int.TryParse(Request.QueryString["ID"], out QueryID))
            {
                if (QueryID <= 0 || QueryID != HF_QueryString)
                {
                    Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='err.aspx?Message=��ѯ�ַ�������'</script>'");
                    return;
                }
            }
            #region  Tranitional Region

            LabMS.BLL.ProjectApp App=new LabMS.BLL.ProjectApp();
            LabMS.Model.ProjectApp model = new LabMS.Model.ProjectApp();

            model = App.GetModel(QueryString);

            //ʵ����
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> lsLab = new List<LabMS.Model.Lab>();
            lsLab = Lab.GetModelList("");
            if (lsLab.Count != 0)
            {
                ddl_Lab.DataSource = lsLab;
                ddl_Lab.DataTextField = "Lab_Name";
                ddl_Lab.DataValueField = "ID";
                ddl_Lab.DataBind();
                if (model.LabID != null)
                {
                    ddl_Lab.Items.FindByValue(model.LabID.ToString()).Selected = true;
                }
            }

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();

            if (DicClass.GetModelList("Code='App_LabType'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='App_LabType'")[0];
                lsDic = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (lsDic.Count != 0)
                {
                    ddl_LabType.DataSource = lsDic;
                    ddl_LabType.DataTextField = "Name";
                    ddl_LabType.DataValueField = "Code";
                    ddl_LabType.DataBind();
                    if (!string.IsNullOrEmpty(model.App_LabType))
                    {
                        ddl_LabType.Items.FindByValue(model.App_LabType).Selected = true;
                    }
                }
            }

            if (DicClass.GetModelList("Code='App_ConstructionType'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='App_ConstructionType'")[0];
                lsDic = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (lsDic.Count != 0)
                {
                    ddl_ConType.DataSource = lsDic;
                    ddl_ConType.DataTextField = "Name";
                    ddl_ConType.DataValueField = "Code";
                    ddl_ConType.DataBind();
                    if (!string.IsNullOrEmpty(model.App_ConstructionType))
                    {
                        ddl_ConType.Items.FindByValue(model.App_ConstructionType).Selected = true;
                    }
                }
            }

            if (model.App_Positions != "")
            {
                lsDic = Dic.GetModelList("Code='" + model.App_Positions.Trim() + "'");

                if (lsDic.Count == 1)
                {
                    tb_Position.Text = lsDic[0].Name;
                    tb_PositionCode.Value = lsDic[0].Code;
                }
            }
            if (model.App_AppTime != null)
            {
                tb_AppTime.Text = model.App_AppTime.Value.ToShortDateString();
            }
            if (model.App_CompletionTime != null)
            {
                tb_CompletionTime.Text = model.App_CompletionTime.Value.ToShortDateString();
            }
            tb_InCharge.Text = model.App_InCharge;
            tb_Phone.Text = model.App_Phone;
            tb_Name.Text = model.App_Code;
            tb_Code.Text = model.App_ProjectCode;
            tb_Loction.Text = model.App_Location;
            tb_InstallCondition.Text = model.App_InstallCondition;
            tb_Necessity.Text = model.App_Necessity;
            tb_ApplyFinancing.Text = model.App_ApplyFinancing.ToString();

            lsDic = Dic.GetModelList("DClass='App_State'");
            foreach (LabMS.Model.Dictionary var in lsDic)
            {
                if (model.App_State == var.Code)
                {
                    lb_State.Text = var.Name;
                }
            }
            #endregion Tranitional

            BindConsume();
        }
Exemplo n.º 21
0
        protected void DataBinds()
        {
            LabMS.BLL.TeachMission Mission = new LabMS.BLL.TeachMission();
            LabMS.Model.TeachMission model = new LabMS.Model.TeachMission();

            model = Mission.GetModel(QueryString);
            tb_CourseCode.Text = model.Ms_CourseCode;
            tb_CourseName.Text = model.Ms_CourseName;
            tb_ExpHouse.Text = model.Ms_CourseHourse.ToString();

            tb_StartWeek.Text = model.Ms_StartWeek.ToString();
            tb_EndWeek.Text = model.Ms_EndWeek.ToString();
            tb_ComputerTime.Text = model.Ms_ComputerHourse.ToString();
            if (model.Ms_Teacher != null)
            {
                tb_TeacherID.Text = model.Ms_Teacher.ToString();
                LabMS.BLL.Teacher Teacher = new LabMS.BLL.Teacher();
                LabMS.Model.Teacher teachermodel = Teacher.GetModel(model.Ms_Teacher.Value);
                if (teachermodel != null)
                {
                    tb_Teacher.Text = teachermodel.Teacher_Name;
                }
            }
            YearBind(model.Ms_Year);
            LabMS.BLL.Lab Lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParentLab = new List<LabMS.Model.Lab>();
            ParentLab = Lab.GetModelList("Lab_ParentID is null");
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            SonLab = Lab.GetModelList("Lab_ParentID is not null");

            for (int i = 0; i < ParentLab.Count; i++)
            {
                ddl_Lab.Items.Add(new ListItem(ParentLab[i].Lab_Name, ParentLab[i].ID.ToString()));
                for (int j = 0; j < SonLab.Count; j++)
                {
                    if (SonLab[j].Lab_ParentID == ParentLab[i].ID)
                    {
                        ddl_Lab.Items.Add(new ListItem("--|" + SonLab[j].Lab_Name, SonLab[j].ID.ToString()));
                    }
                }
            }
            ddl_Lab.Items.Insert(0, new ListItem("--��ѡ��--", "0"));

            if (model.LabID != null)
            {
                ddl_Lab.Items.FindByValue(model.LabID.ToString()).Selected = true;
            }

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
            if (DicClass.GetModelList("Code='Conflict'").Count != 0)
            {
                ds = DicClass.GetModelList("Code='Conflict'")[0];
                ls = Dic.GetModelList("DClass='" + ds.Code + "'");
                if (ls.Count != 0)
                {
                    rbl_Conflict.DataSource = ls;
                    rbl_Conflict.DataTextField = "Name";
                    rbl_Conflict.DataValueField = "Code";
                    rbl_Conflict.DataBind();
                    if (model.Ms_Conflict != "")
                    {
                        rbl_Conflict.Items.FindByValue(model.Ms_Conflict).Selected = true;
                    }
                }

            }
        }
Exemplo n.º 22
0
        protected string GetEducationType(object value)
        {
            if (value != null)
            {
                if (value.ToString() != "")
                {
                    LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
                    List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
                    ls = Dic.GetModelList("DClass='education'");
                    for (int n = 0; n < ls.Count; n++)
                    {
                        if (value.ToString() == ls[n].Code)
                        {
                            return ls[n].Name;
                        }
                    }
                }
            }

            return "���Ļ��̶�";
        }
Exemplo n.º 23
0
        protected void DataBinds()
        {
            if (HF_QueryString != QueryString || QueryString <= 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='~/err.aspx?Message=��ѯ�ַ�������';</script>");
                return;
            }

            ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();

            ExtendModule.ApplicationOther model = new ExtendModule.ApplicationOther();
            model = Application.GetModelList2("ProjectApp.ID=" + QueryString.ToString())[0];

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();

            lsDic = Dic.GetModelList("Code='" + model.App_Positions.Trim() + "'");

            if (lsDic.Count == 1)
            {
                tb_Position.Text = lsDic[0].Name;
            }

            tb_Code.Text = model.App_ProjectCode;
            tb_Name.Text = model.App_Code;
            ddl_Lab.Text = model.Lab_Name;
            ddl_LabType.Text = model.LabType_Name;
            ddl_ConType.Text = model.ConType_Name;
            if (model.App_AppTime != null)
            {
                tb_AppTime.Text = model.App_AppTime.Value.ToShortDateString();
            }
            if (model.App_CompletionTime != null)
            {
                tb_CompletionTime.Text = model.App_CompletionTime.Value.ToShortDateString();
            }
            tb_InCharge.Text = model.App_InCharge;
            tb_ApplyFinancing.Text = model.App_ApplyFinancing.ToString();
            tb_AppView.Text = model.App_ArgumentView;
            tb_Phone.Text = model.App_Phone;

            tb_Loction.Text = model.App_Location;
            tb_InstallCondition.Text = model.App_InstallCondition;
            tb_Necessity.Text = model.App_Necessity;

            lsDic = Dic.GetModelList("DClass='Conclusion'");

            ddl_Conclusion.DataSource = lsDic;
            ddl_Conclusion.DataValueField = "Code";
            ddl_Conclusion.DataTextField = "Name";
            ddl_Conclusion.DataBind();
            ddl_Conclusion.Items.Insert(0, new ListItem("--��ѡ����֤����--", "0"));

            string value = "";
            if (ddl_Conclusion.Items.FindByValue(model.App_ArgumentConclusion) != null)
            {
                ddl_Conclusion.Items.FindByValue(model.App_ArgumentConclusion).Selected = true;
                value = ddl_Conclusion.SelectedItem.Text;
            }

            lb_ApproveFinancing.Text = model.App_ApproveFinancing.ToString();
            lb_Conclusion.Text = value;
            lb_AppView.Text = model.App_ArgumentView;

            switch (model.App_State)
            {
                case "Approved":
                    {

                        lb_AppView.Text = model.App_ArgumentView;
                        lb_ApproveFinancing.Text = model.App_ApproveFinancing.Value.ToString();
                        lb_Conclusion.Text = "ͨ����֤";
                        Submit.Visible = false;
                        add_conclusion.Attributes.Add("style", "display:none");
                    }
                    break;
                case "Submitted":
                    {
                        show_conclusion.Attributes.Add("style", "display:none");
                        tb_ApproveFinancing.Visible = false;
                        tb_AppView.Visible = false;

                    }
                    break;
                case "Rejected":
                    {
                        Submit.Visible = true;
                        show_conclusion.Attributes.Add("style", "display:none");
                    }
                    break;

                default:
                    {
                        add_conclusion.Attributes.Add("style", "display:none");
                        Submit.Visible = false;
                        show_conclusion.Attributes.Remove("style");
                        break;
                    }
            }
        }