Esempio n. 1
0
 /// <summary>
 /// 根据专业ID查找出专业名称
 /// </summary>
 /// <param name="ID"></param>
 /// <returns></returns>
 public string ProessionalNameByID(int ID)
 {
     string str = "ID="+ID;
     LabMS.BLL.Professional BP = new LabMS.BLL.Professional();
     string Pro_Name = BP.GetModelList(str)[0].Pro_Name;
     return Pro_Name;
 }
 protected void Gv_DataBind()
 {
     LabMS.BLL.Professional Pro = new LabMS.BLL.Professional();
     List<LabMS.Model.Professional> ls = Pro.GetModelList(CombineStr());
     Gv_Pro.DataSource = ls;
     Gv_Pro.DataBind();
 }
Esempio n. 3
0
 protected void DataBinds()
 {
     YearBind();
     LabMS.BLL.Professional Pro = new LabMS.BLL.Professional();
     List<LabMS.Model.Professional> ls = new List<LabMS.Model.Professional>();
     ls = Pro.GetModelList("");
     if (ls.Count != 0)
     {
         ddl_Pro.DataSource = ls;
         ddl_Pro.DataTextField = "Pro_Name";
         ddl_Pro.DataValueField = "ID";
         ddl_Pro.DataBind();
     }
 }
Esempio n. 4
0
        protected string GetProType(object value)
        {
            if (value != null)
            {
                if (value.ToString() != "")
                {
                    int ID=0;
                    if (int.TryParse(value.ToString(), out ID))
                    {
                        LabMS.BLL.Professional Pro = new LabMS.BLL.Professional();
                        List<LabMS.Model.Professional> ls = new List<LabMS.Model.Professional>();

                        ls = Pro.GetModelList("");
                        if (ls.Count != 0)
                        {
                            for (int n = 0; n < ls.Count; n++)
                            {
                                if (ls[n].ID == ID)
                                {
                                    return ls[n].Pro_Name;
                                }
                            }
                        }
                    }
                }
            }
            return "δ�����κ�רҵ";
        }
Esempio n. 5
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. 6
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();
        }
Esempio n. 7
0
        protected void DataBinds()
        {
            LabMS.BLL.ProfessionalPlan ProPlan = new LabMS.BLL.ProfessionalPlan();
            LabMS.Model.ProfessionalPlan proplanmodel = new LabMS.Model.ProfessionalPlan();
            proplanmodel = ProPlan.GetModel(QueryString);
              /* LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> ls = new List<LabMS.Model.Dictionary>();
            ls = Dic.GetModelList("DClass='ruxuenianfen'");
            ddl_Year.DataTextField = "Name";
            ddl_Year.DataValueField = "Code";
            ddl_Year.DataSource = ls;
            ddl_Year.DataBind();
            */

            YearBind();

            LabMS.BLL.Professional Professional = new LabMS.BLL.Professional();
            List<LabMS.Model.Professional> ls1 = new List<LabMS.Model.Professional>();
            ls1 = Professional.GetModelList("");
            ddl_Pro.DataSource = ls1;
            ddl_Pro.DataTextField = "Pro_Name";
            ddl_Pro.DataValueField = "ID";
            ddl_Pro.DataBind();
            if (proplanmodel != null)
            {
                tb_Content.Text = proplanmodel.Pro_Content;
                if (proplanmodel.Pro_Curriculum == 1)
                {
                    ddl_Term.SelectedValue = "1";
                }
                else
                {
                    ddl_Term.SelectedValue="2";
                }
                if (ddl_Pro.Items.FindByValue(proplanmodel.Pro_Professional.ToString()) != null)
                {
                    ddl_Pro.Items.FindByValue(proplanmodel.Pro_Professional.ToString()).Selected = true;
                }
            }
            hf_ID.Value = QueryString.ToString();
        }
Esempio n. 8
0
        void binddll()
        {
            LabMS.Model.SysSetting msys = new LabMS.Model.SysSetting();
            ExtendBLL.SysSetting extendsys = new ExtendBLL.SysSetting();
            msys = extendsys.GetCurrentSetting();
            List<string> listYear = Common.GradeHelper.GetCurrentGrade((int)msys.CurrentYear, (int)msys.CurrentSemester, false);
            ddlYear.DataSource = listYear;
            ddlYear.DataBind();
            ddlYear.Items.Insert(0, new ListItem("", "0"));

            List<LabMS.Model.Professional> listPro = new List<LabMS.Model.Professional>();
            LabMS.BLL.Professional bPro = new LabMS.BLL.Professional();
            listPro = bPro.GetModelList("");
            ddlPro.DataSource = listPro;
            ddlPro.DataValueField = "ID";
            ddlPro.DataTextField = "Pro_Name";
            ddlPro.DataBind();
            ddlPro.Items.Insert(0, new ListItem("", "0"));
            bindClass(ddlYear.SelectedValue, ddlPro.SelectedValue);
        }
Esempio n. 9
0
        protected void DataBinds()
        {
            LabMS.BLL.Professional Pro = new LabMS.BLL.Professional();
            List<LabMS.Model.Professional> lsPro = new List<LabMS.Model.Professional>();
            lsPro = Pro.GetModelList("");
            ddl_Pro.DataSource = lsPro;
            ddl_Pro.DataTextField = "Pro_Name";
            ddl_Pro.DataValueField = "ID";
            ddl_Pro.DataBind();
            ddl_Pro.Items.Insert(0, new ListItem("��ѡ��", "0"));

            YearBind();

            Gv_DataBinds();
        }