Esempio 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"));
            }
        }
Esempio 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();
            }
        }
        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;
                    }
                }
            }
        }
Esempio n. 4
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"));
        }
Esempio n. 5
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"));
            }
        }
Esempio n. 6
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();
        }
Esempio n. 7
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LabMS.Model.DictionaryClass json ;
                LabMS.BLL.DictionaryClass bDictionaryclass = new LabMS.BLL.DictionaryClass();
                List<LabMS.Model.DictionaryClass> list = new List<LabMS.Model.DictionaryClass>();
                list = bDictionaryclass.GetModelList("1=1");

                if (list.Count == 0)
                {
                    //没记录
                    throw new Exception("字典表中没有记录!");
                }
                else
                {
                    List<LabMS.Model.DictionaryClass> list2 = new List<LabMS.Model.DictionaryClass>();
                    for (int i = 0; i < list.Count; i++)
                    {
                        json = new LabMS.Model.DictionaryClass();//避免值被覆盖
                        json.ID = list[i].ID;
                        json.Code = list[i].Code;
                        json.Name = list[i].Name;
                        list2.Add(json);
                    }

                    string strJson = Newtonsoft.Json.JavaScriptConvert.SerializeObject(list2);//序列化,把JSON转化为string类型

                    context.Response.ContentType = "application/json";
                    context.Response.Write(strJson);
                }
            }
            catch
            {
                context.Response.ContentType = "application/json";
                context.Response.Write("{error:true}");
            }
        }
Esempio n. 8
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();
        }
Esempio n. 9
0
 /// <summary>
 /// 从字典大类中获取小类编码,DClass
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public string GetDClassFromDictorary(string name)
 {
     string str = "Name='"+name+"'";
     LabMS.BLL.DictionaryClass BDC = new LabMS.BLL.DictionaryClass();
     return BDC.GetModelList(str)[0].Code;
 }
Esempio n. 10
0
 LabMS.Model.DictionaryClass checkQueryString(string strDclass)
 {
     LabMS.BLL.DictionaryClass dicclass = new LabMS.BLL.DictionaryClass();
     string strWhere = " Code = '" + strDclass + "' ";
     List<LabMS.Model.DictionaryClass> listDClass = dicclass.GetModelList(strWhere);
     if (listDClass.Count <= 0)
     {
         return null;
     }
     return listDClass[0];
 }
Esempio n. 11
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();
                }
            }
        }
Esempio n. 12
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();
 }
Esempio n. 13
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
        }
Esempio n. 14
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();
        }
Esempio n. 15
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;
                    }
            }
        }
        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;
                    }
                }

            }
        }
Esempio 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();
        }