//绑定所属实验室
        protected void LabDropdowlist()
        {
            LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParLab = new List<LabMS.Model.Lab>();
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            List<LabMS.Model.Lab> LabTemp = new List<LabMS.Model.Lab>();

            ParLab = lab.GetModelList("Lab_ParentID is null");
            SonLab = lab.GetModelList("Lab_ParentID is not null");
            LabTemp = lab.GetModelList("Lab_ParentID is null");

            int count = ParLab.Count, count1 = SonLab.Count;
            for (int i = 0; i < count; i++)
            {
                int ID = ParLab[i].ID;
                int m = 0;
                for (int j = 0; j < count1; j++)
                {
                    LabMS.Model.Lab labModel = new LabMS.Model.Lab();
                    int ParentID = int.Parse(SonLab[j].Lab_ParentID.ToString());

                    if (ParentID == ID)
                    {
                        labModel.ID = SonLab[j].ID;
                        labModel.Lab_Name = "|-" + SonLab[j].Lab_Name;
                        LabTemp.Insert(i + m + 1, labModel);
                        m++;
                    }
                }
            }
            LabDDL.DataSource = LabTemp;
            LabDDL.DataBind();
            ListItem item = new ListItem("无", "0");
            LabDDL.Items.Insert(0, item);
        }
        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"));

            YearBind();

            Gv_DataBinds();
        }
        /// <summary>
        /// ��GridView��
        /// </summary>
        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.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_BuildType.DataSource = lsDic;
                    cbl_BuildType.DataTextField = "Name";
                    cbl_BuildType.DataValueField = "Code";
                    cbl_BuildType.DataBind();
                }
            }

            if (DicClass.GetModelList("Code='App_State'").Count != 0)
            {
                Ds = DicClass.GetModelList("Code='App_State'")[0];
                lsDic = Dic.GetModelList("DClass='" + Ds.Code + "'");
                if (lsDic.Count != 0)
                {
                    ddl_State.DataSource = lsDic;
                    ddl_State.DataTextField = "Name";
                    ddl_State.DataValueField = "Code";
                    ddl_State.DataBind();
                    ddl_State.Items.Insert(0, new ListItem("--����״̬--", "0"));
                }
            }
        }
Exemple #4
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"));
            }
        }
Exemple #5
0
        public void bind(string strWhere)
        {
            List<ExtendModule.InstrumentAndConsumables> listinstrument = new
                List<ExtendModule.InstrumentAndConsumables>();
            ExtendBLL.InstrumentAndConsumables beconsum = new ExtendBLL.InstrumentAndConsumables();
            listinstrument = beconsum.GetExtendModelList(" Type = 'lowvalue' " + strWhere + " order by ID desc ");

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            foreach (ExtendModule.InstrumentAndConsumables i in listinstrument)
            {
                mLab = blab.GetModelList(" Lab_Code='" + i.StockLocation + "'");
                if (mLab.Count > 0)
                {
                    i.StockLocation = mLab[0].Lab_Name;
                }
                listCClass = eDictionary.GetModelList(" Code='" + i.Source + "' ");
                if (listCClass.Count > 0)
                {
                    i.Source = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" Code='" + i.Arrow + "' ");
                if (listCClass.Count > 0)
                {
                    i.Arrow = listCClass[0].Name;
                }
            }

            gvInstrument.DataSource = listinstrument;
            gvInstrument.DataBind();
        }
        public void bindDDL(LabMS.Model.OpentProject mopproject)
        {
            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            mLab = blab.GetModelList(" Lab_ParentID is null ");
            ddlLabName.DataSource = mLab;
            ddlLabName.DataTextField = "Lab_Name";
            ddlLabName.DataValueField = "Lab_Code";
            ddlLabName.DataBind();
            ddlLabName.SelectedValue = mopproject.Project_Lab;

            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();

            listCClass = eDictionary.GetItemListByDClass("shiyanleibie");
            ddlProjectCategory.DataSource = listCClass;
            ddlProjectCategory.DataTextField = "Name";
            ddlProjectCategory.DataValueField = "Code";
            ddlProjectCategory.DataBind();
            ddlProjectCategory.SelectedValue = mopproject.Project_Category;

            listCClass = eDictionary.GetItemListByDClass("shiyanleixing");
            ddlProjectType.DataSource = listCClass;
            ddlProjectType.DataTextField = "Name";
            ddlProjectType.DataValueField = "Code";
            ddlProjectType.DataBind();
            ddlProjectType.SelectedValue = mopproject.Project_Type;

            listCClass = eDictionary.GetItemListByDClass("shiyanyaoqiu");
            ddlProjectRequire.DataSource = listCClass;
            ddlProjectRequire.DataTextField = "Name";
            ddlProjectRequire.DataValueField = "Code";
            ddlProjectRequire.DataBind();
            ddlProjectRequire.SelectedValue = mopproject.Project_Require;

            listCClass = eDictionary.GetItemListByDClass("shiyanzheleibie");
            ddlProjectPartnerType.DataSource = listCClass;
            ddlProjectPartnerType.DataTextField = "Name";
            ddlProjectPartnerType.DataValueField = "Code";
            ddlProjectPartnerType.DataBind();
            ddlProjectPartnerType.SelectedValue = mopproject.Project_PartnerType;

            listCClass = eDictionary.GetItemListByDClass("shiyanxiangmulaiyuan");
            ddlProjectComFrom.DataSource = listCClass;
            ddlProjectComFrom.DataTextField = "Name";
            ddlProjectComFrom.DataValueField = "Code";
            ddlProjectComFrom.DataBind();
            ddlProjectComFrom.SelectedValue = mopproject.OP_ProSource;

            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);
            ddlOPGrade.DataSource = listYear;
            ddlOPGrade.DataBind();
            ddlOPGrade.Items.Insert(0, new ListItem("", "0"));
            ddlOPGrade.SelectedValue = mopproject.OP_Grade;

            ddlOPFunds.SelectedValue = mopproject.OP_Funds;
        }
        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"));
        }
Exemple #8
0
 //��ʵ�������� �����б��
 protected void LabDropdownlist()
 {
     LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
     List<LabMS.Model.Lab> lablist = new List<LabMS.Model.Lab>();
     lablist = lab.GetModelList(" Lab_ParentID is null order by [ID] DESC");
     LabNameDDL.DataSource = lablist;
     LabNameDDL.DataBind();
 }
        public void bind(string strWhere)
        {
            lbErr.Visible = false;
            List<Model.RecipientsApp> listrescipientsappmodule = new List<Model.RecipientsApp>();
            ExtendBLL.RecipientsApp berescipients = new ExtendBLL.RecipientsApp();
            listrescipientsappmodule = berescipients.GetModelList(strWhere);

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();

            try
            {
                foreach (Model.RecipientsApp rapp in listrescipientsappmodule)
                {
                    mLab = blab.GetModelList("Lab_Code = '" + rapp.EncodedWarehouse + "'");
                    if (mLab.Count > 0)
                    {
                        rapp.EncodedWarehouse = mLab[0].Lab_Name;
                    }
                    else
                    {
                        rapp.EncodedWarehouse = "无";
                    }
                    mLab = blab.GetModelList("Lab_Code = '" + rapp.Laboratory + "'");
                    if (mLab.Count > 0)
                    {
                        rapp.Laboratory = mLab[0].Lab_Name;
                    }
                    else
                    {
                        rapp.Laboratory = "无";
                    }
                    rapp.Type = LabMS.Common.Global.GetEquipmentByCode(rapp.Type);
                    rapp.State = LabMS.Common.Status.GetOpenProjectStatus(rapp.State);
                }
            }
            catch(Exception ex)
            {
                lbErr.Text = ex.Message;
                lbErr.Visible = true;
                return;
            }

            GridViewrapp.DataSource = listrescipientsappmodule;
            GridViewrapp.DataBind();
        }
Exemple #10
0
 protected void ddlbind()
 {
     LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
     List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
     mLab = blab.GetModelList(" Lab_ParentID is null ");
     ddlLab.DataSource = mLab;
     ddlLab.DataTextField = "Lab_Name";
     ddlLab.DataValueField = "Lab_Code";
     ddlLab.DataBind();
 }
        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();
        }
Exemple #12
0
        //������ʵ����
        protected void LabDropdowlist()
        {
            LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParLab = new List<LabMS.Model.Lab>();

            ParLab = lab.GetModelList("Lab_ParentID is null");
            LabNameDDL.DataSource = ParLab;
            LabNameDDL.DataBind();
            ListItem item = new ListItem("--����ʵ����--", "0");
            LabNameDDL.Items.Insert(0, item);
        }
 public void bindddl()
 {
     LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
     List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
     mLab = blab.GetModelList(" Lab_ParentID is null ");
     ddlWarehouse.DataSource = mLab;
     ddlWarehouse.DataTextField = "Lab_Name";
     ddlWarehouse.DataValueField = "Lab_Code";
     ddlWarehouse.DataBind();
     ddlWarehouse.Items.Insert(0, new ListItem("", "null"));
 }
 protected void dllbind()
 {
     tbReportTime.Text = DateTime.Now.ToShortDateString();
     LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
     List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
     mLab = blab.GetModelList(" Lab_ParentID is null ");
     ddlLab.DataSource = mLab;
     ddlLab.DataTextField = "Lab_Name";
     ddlLab.DataValueField = "Lab_Code";
     ddlLab.DataBind();
 }
Exemple #15
0
 //�ж�ʵ�����Ƿ��Ѵ���
 protected bool IsCode(string code)
 {
     LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
     List<LabMS.Model.Lab> list = new List<LabMS.Model.Lab>();
     if (ViewState["SubID"] != null)
     {
         list = lab.GetModelList("Lab_Code='" + code + "' and [ID]<>" + int.Parse(ViewState["SubID"].ToString()));
     }
     else
     {
         list = lab.GetModelList("Lab_Code='" + code + "'");
     }
     if (list.Count == 0)
     {
         return false;
     }
     else
     {
         return true;
     }
 }
Exemple #16
0
        //�ж�ʵ�����Ƿ��Ѵ���
        protected bool IsCode(string code)
        {
            LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> list = new List<LabMS.Model.Lab>();

            if (IDHF.Value != "0")
            {
                list = lab.GetModelList("Lab_Code='" + code + "' and [ID]<>" + int.Parse(IDHF.Value));
            }
            else
            {
                list = lab.GetModelList("Lab_Code='" + code + "'");
            }
            if (list.Count == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
        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"));
        }
Exemple #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            strPagePrivilege.Add("TJZY");
            strPageUserType.Add("mana");
            strPageUserType.Add("teacher");

            if (!Page.IsPostBack)
            {
                LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
                List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
                mLab = blab.GetModelList(" Lab_ParentID is null ");
                ResourceLab.DataSource = mLab;
                ResourceLab.DataTextField = "Lab_Name";
                ResourceLab.DataValueField = "ID";
                ResourceLab.DataBind();

                ResourceLab.Items.Add(new ListItem("ȫ��", "-1"));
                ResourceLab.Items[ResourceLab.Items.Count - 1].Selected = true;
            }
        }
        public void bind(string strWhere)
        {
            List<ExtendModule.InstrumentAndConsumables> listevaluables = new
               List<InstrumentAndConsumables>();
            ExtendBLL.InstrumentAndConsumables bevaluables = new ExtendBLL.InstrumentAndConsumables();
            listevaluables = bevaluables.GetExtendModelList(" Type = 'guizhongyiqi' " + strWhere + " order by ID desc ");

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            foreach (ExtendModule.InstrumentAndConsumables i in listevaluables)
            {
                mLab = blab.GetModelList(" Lab_Code='" + i.StockLocation + "'");
                if (mLab.Count > 0)
                {
                    i.StockLocation = mLab[0].Lab_Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shebeilaiyuan' and Code='" + i.Source + "' ");
                if (listCClass.Count > 0)
                {
                    i.Source = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shiyongfangxiang' and Code='" + i.Arrow + "' ");
                if (listCClass.Count > 0)
                {
                    i.Arrow = listCClass[0].Name;
                }
                listCClass = eDictionary.GetModelList(" DClass='shebeizhuangtai' and Code='" + i.PresentSituation + "' ");
                if (listCClass.Count > 0)
                {
                    i.PresentSituation = listCClass[0].Name;
                }
            }

            GridViewValuables.DataSource = listevaluables;
            GridViewValuables.DataBind();
        }
Exemple #20
0
        public void bindDDL(LabMS.Model.RecipientsApp mRecipientsApp)
        {
            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            mLab = blab.GetModelList(" Lab_ParentID is null ");
            ddlLabs.DataSource = mLab;
            ddlLabs.DataTextField = "Lab_Name";
            ddlLabs.DataValueField = "Lab_Code";
            ddlLabs.DataBind();
            ddlLabs.SelectedValue = mRecipientsApp.EncodedWarehouse;

            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();

            listCClass = eDictionary.GetItemListByDClass("shiyongfangxiang");
            ddlArrow.DataSource = listCClass;
            ddlArrow.DataTextField = "Name";
            ddlArrow.DataValueField = "Code";
            ddlArrow.DataBind();
            ddlArrow.SelectedValue = mRecipientsApp.Arrow;

            ddlEType.SelectedValue = mRecipientsApp.Type;
        }
        void bind()
        {
            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            mLab = blab.GetModelList(" Lab_ParentID is null ");
            ddlLabs.DataSource = mLab;
            ddlLabs.DataTextField = "Lab_Name";
            ddlLabs.DataValueField = "Lab_Code";
            ddlLabs.DataBind();

            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();

            listCClass = eDictionary.GetItemListByDClass("shiyongfangxiang");
            ddlArrow.DataSource = listCClass;
            ddlArrow.DataTextField = "Name";
            ddlArrow.DataValueField = "Code";
            ddlArrow.DataBind();
        }
        void bind(LabMS.Model.RecipientsApp recipientsApp)
        {
            lbState.Text = Common.Status.GetOpenProjectStatus(recipientsApp.State);
            Comment.Text = Common.codehelper.Decode(recipientsApp.AppComment);

            tbUserNub.Text = recipientsApp.AppNub;
            tbCNub.Text = recipientsApp.ClassNumber;

            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            mLab = blab.GetModelList("Lab_Code='"+ recipientsApp.Laboratory +"'");
            if(mLab.Count>0)
            {
                tbLabName.Text = mLab[0].Lab_Name;
            }

            lbMPerson.Text = recipientsApp.MRecipients;

            lbCName.Text = recipientsApp.Name;
            try
            {
                tbRecipientsDate.Text = recipientsApp.RecipientTime.Value.ToShortDateString();
            }
            catch { }

            lbTypeNub.Text = recipientsApp.Words;
            VerifyPerson.Text = recipientsApp.VerifyPerson;
            try
            {
                VerifyTime.Text = recipientsApp.VerifyTime.Value.ToShortDateString();
            }
            catch { }
            lbVerifyComment.Text = Common.codehelper.Decode(recipientsApp.VerifyComment);
        }
        void IniPage(string strYear, string strSemester)
        {
            List<LabMS.Model.Lab> listlab = new List<LabMS.Model.Lab>();
            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            try
            {
                listlab = blab.GetModelList("");
            }
            catch (Exception ex)
            {
                lbErr.Visible = true;
                lbErr.Text = ex.Message;
                return;
            }

            List<LabMS.Model.OpentProject> listopproject = new List<LabMS.Model.OpentProject>();
            LabMS.BLL.OpentProject bopproject = new LabMS.BLL.OpentProject();
            List<LabMS.Model.Teacher> listmteacher = new List<LabMS.Model.Teacher>();
            LabMS.BLL.Teacher bteacher = new LabMS.BLL.Teacher();
            List<LabMS.Model.ProjectAppointment> listprojectapp = new List<LabMS.Model.ProjectAppointment>();
            ExtendBLL.ProjectAppointment bprojectapp = new ExtendBLL.ProjectAppointment();

            string strtotalTable = "<table cellpadding='5' cellspacing='0' border='1' style='width: 100%; border-collapse: collapse;' class='infoTable'>";
            strtotalTable += "<thead>";
            strtotalTable += "<tr class='header'>";
            strtotalTable += "<th scope='col'>";
            strtotalTable += "实验室";
            strtotalTable += "</th>";
            strtotalTable += "<th scope='col'>";
            strtotalTable += "开放项目";
            strtotalTable += "</th>";
            strtotalTable += "</tr>";
            strtotalTable += "</thead>";

            strtotalTable += "<tbody>";

            foreach (LabMS.Model.Lab l in listlab)
            {
                strtotalTable += "<tr>";
                strtotalTable += "<td>";
                strtotalTable += l.Lab_Name;
                strtotalTable += "</td>";
                strtotalTable += "<td>";
                try
                {
                    listopproject = bopproject.GetModelList(" SYear=" + strYear + " and Semester = " + strSemester
                                                                            + "  and Project_Lab='" + l.Lab_Code + "' order by ID");
                }
                catch (Exception ex)
                {
                    lbErr.Visible = true;
                    lbErr.Text = ex.Message;
                    return;
                }

                if (listopproject.Count > 0)
                {
                    strtotalTable += "<table cellpadding='0' cellspacing='0' border='1' style='width: 100%; border-collapse: collapse;' class='infoTable'>";
                    strtotalTable += "<thead>";
                    strtotalTable += "<tr class='header'>";
                    strtotalTable += "<td scope='col'>";
                    strtotalTable += "实验项目";
                    strtotalTable += "</td>";
                    strtotalTable += "<td scope='col'>";
                    strtotalTable += "时间(周次)";
                    strtotalTable += "</td>";
                    strtotalTable += "<td scope='col'>";
                    strtotalTable += "指导老师";
                    strtotalTable += "</td>";
                    strtotalTable += "<td scope='col'>";
                    strtotalTable += "学生数";
                    strtotalTable += "</td>";
                    strtotalTable += "</tr>";
                    strtotalTable += "</thead>";
                    strtotalTable += "<tbody>";
                    foreach (LabMS.Model.OpentProject o in listopproject)
                    {
                        strtotalTable += "<tr>";
                        strtotalTable += "<td>";
                        strtotalTable += o.OP_ProjectName;
                        strtotalTable += "</td>";
                        strtotalTable += "<td>";
                        strtotalTable += o.Project_StartWeek.Value.ToString() + "--" + o.Project_EndWeek.Value.ToString();
                        strtotalTable += "</td>";
                        strtotalTable += "<td>";
                        try
                        {
                            listmteacher = bteacher.GetModelList(" Teacher_Code= '" + o.OP_Teacher + "'");
                        }
                        catch (Exception ex)
                        {
                            lbErr.Visible = true;
                            lbErr.Text = ex.Message;
                            return;
                        }

                        if (listmteacher.Count > 0)
                        {
                            o.OP_Teacher = listmteacher[0].Teacher_Name;
                        }
                        strtotalTable += o.OP_Teacher;
                        strtotalTable += "</td>";
                        strtotalTable += "<td>";
                        try
                        {
                            listprojectapp = bprojectapp.GetModelList(" OP_ProjectCode ='" + o.OP_ProjectCode + "'");
                        }
                        catch (Exception ex)
                        {
                            lbErr.Visible = true;
                            lbErr.Text = ex.Message;
                            return;
                        }

                        o.OP_OpenType = listprojectapp.Count.ToString();
                        strtotalTable += o.OP_OpenType;
                        strtotalTable += "</td>";
                        strtotalTable += "</tr>";
                    }
                    strtotalTable += "</tbody>";
                    strtotalTable += "</table>";
                }
                else
                {
                    strtotalTable += "无";
                }
                strtotalTable += "</td>";
                strtotalTable += "</tr>";
            }

            strtotalTable += "</tbody>";

            strtotalTable += "</table>";
            lbSituation.Text = strtotalTable;
        }
Exemple #24
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();
        }
        //绑定用房
        protected void HouseDropDownList()
        {
            LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> labModelList = new List<LabMS.Model.Lab>();
            ExtendBLL.Location loc = new ExtendBLL.Location();
            if (LabDDL.SelectedValue == "")
            {
                return;
            }
            string str = "a.LabID=" + int.Parse(LabDDL.SelectedValue);

            labModelList = lab.GetModelList("Lab_ParentID=" + int.Parse(LabDDL.SelectedValue));
            for (int i = 0; i < labModelList.Count; i++)
            {
                str += " or a.LabID=" + labModelList[i].ID.ToString();
            }

            DataSet ds = loc.GetRoomAddress(str);
            HouseDDL.DataSource = ds;
            HouseDDL.DataBind();
        }
        //绑定所属实验室
        protected void LabDropdowlist()
        {
            //LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            //List<LabMS.Model.Lab> ParLab = new List<LabMS.Model.Lab>();
            //List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();

            //ParLab = lab.GetModelList("Lab_ParentID is null");
            //SonLab = lab.GetModelList("Lab_ParentID is not null");
            //int count = ParLab.Count, count1 = SonLab.Count;

            //for (int i = 0; i < count; i++)
            //{
            //    int ID = ParLab[i].ID;
            //    for (int j = 0; j < count1; j++)
            //    {
            //        LabMS.Model.Lab labModel = new LabMS.Model.Lab();
            //        int ParentID = int.Parse(SonLab[j].Lab_ParentID.ToString());

            //        if (ParentID == ID)
            //        {
            //            labModel.ID = SonLab[j].ID;
            //            labModel.Lab_Name = "|-" + SonLab[j].Lab_Name;
            //            ParLab.Insert(i + 1, labModel);
            //        }
            //    }
            //}
            //LabDDL.DataSource = ParLab;
            //LabDDL.DataBind();
            LabMS.BLL.Lab lab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> ParLab = new List<LabMS.Model.Lab>();
            List<LabMS.Model.Lab> SonLab = new List<LabMS.Model.Lab>();
            List<LabMS.Model.Lab> Lab = new List<LabMS.Model.Lab>();

            Lab = lab.GetModelList("Lab_ParentID is null");
            ParLab = lab.GetModelList("Lab_ParentID is null");
            SonLab = lab.GetModelList("Lab_ParentID is not null");
            int count = ParLab.Count, count1 = SonLab.Count;

            for (int i = 0; i < count; i++)
            {
                int ID = ParLab[i].ID;
                for (int j = 0; j < count1; j++)
                {
                    LabMS.Model.Lab labModel = new LabMS.Model.Lab();
                    int ParentID = int.Parse(SonLab[j].Lab_ParentID.ToString());

                    if (ParentID == ID)
                    {
                        labModel.ID = SonLab[j].ID;
                        labModel.Lab_Name = "|-" + SonLab[j].Lab_Name;
                        Lab.Insert(i + j + 1, labModel);
                    }
                }
            }
            LabDDL.DataSource = Lab;
            LabDDL.DataBind();
        }
        protected void DeletBtn_Click(object sender, EventArgs e)
        {
            LabMS.BLL.Lab isLab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> isLabModel = new List<LabMS.Model.Lab>();

            try
            {
                isLabModel = isLab.GetModelList("Lab_ParentID=" + int.Parse(IDHF.Value));
                if (isLabModel.Count > 0)
                {
                    Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script type='text/javascript'>alert('系统异常错误!');</script>");
                    return;
                }
                List<string> strID = new List<string>();
                List<string> strTable = new List<string>();
                List<string> strColName = new List<string>();
                #region 实验室
                strID.Add(IDHF.Value);
                strTable.Add("Lab");
                strColName.Add("ID");
                #endregion
                #region 获奖信息
                strID.Add(IDHF.Value);
                strTable.Add("AwardInfo");
                strColName.Add("Award_Lab");
                #endregion
                #region 实验用房
                strID.Add(IDHF.Value);
                strTable.Add("Location");
                strColName.Add("LabID");
                #endregion
                #region 人员信息
                strID.Add(IDHF.Value);
                strTable.Add("Staff");
                strColName.Add("Staff_Lab");
                #endregion
                #region 项目申请书
                strID.Add(IDHF.Value);
                strTable.Add("ProjectApp");
                strColName.Add("LabID");
                #endregion
                #region 岗位职责
                strID.Add(IDHF.Value);
                strTable.Add("Responsibility");
                strColName.Add("Resp_Lab");
                #endregion
                #region 实验项目
                strID.Add(IDHF.Value);
                strTable.Add("Project");
                strColName.Add("Project_Lab");
                #endregion
                #region 课程安排
                strID.Add(IDHF.Value);
                strTable.Add("Arrangement");
                strColName.Add("LabID");
                #endregion
                #region 教学任务书
                strID.Add(IDHF.Value);
                strTable.Add("TeachMission");
                strColName.Add("LabID");
                #endregion
                #region 课程
                strID.Add(IDHF.Value);
                strTable.Add("Course");
                strColName.Add("LabID");
                #endregion
                #region 课程
                strID.Add(IDHF.Value);
                strTable.Add("Evaluation");
                strColName.Add("LabID");
                #endregion
                ExtendBLL.LabInfo labInfo = new ExtendBLL.LabInfo();
                labInfo.DeleteLab(strID, strTable, strColName);
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script type='text/javascript'>alert('删除成功!');refreshParent();window.close();</script>");
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script type='text/javascript'>alert('删除失败!');refreshParent();window.close();</script>");
            }
        }
        void bind(string strwhere)
        {
            LabMS.Model.SysSetting msys = new LabMS.Model.SysSetting();
            ExtendBLL.SysSetting extendsys = new ExtendBLL.SysSetting();
            msys = extendsys.GetCurrentSetting();

            List<LabMS.Model.OpentProject> listmopproject = new List<LabMS.Model.OpentProject>();
            LabMS.BLL.OpentProject bopproject = new LabMS.BLL.OpentProject();

            if (strwhere.Equals(""))
            {
                strwhere += " 1=1 ";
            }

            strwhere += " and  SYear = " + msys.CurrentYear + " and Semester = " + msys.CurrentSemester;

            if (UserType == "teacher")
            {
                strwhere += " and  OP_Teacher = '" + UserCode + "'";
            }

            listmopproject = bopproject.GetModelList(strwhere + " order by ID desc ");

            foreach (LabMS.Model.OpentProject op in listmopproject)
            {
                List<LabMS.Model.Teacher> listmteacher = new List<LabMS.Model.Teacher>();
                LabMS.BLL.Teacher bteacher = new LabMS.BLL.Teacher();
                listmteacher = bteacher.GetModelList(" Teacher_Code= '" + op.OP_Teacher + "'");
                if (listmteacher.Count > 0)
                {
                    op.OP_Teacher = listmteacher[0].Teacher_Name;
                }

                LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
                List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
                mLab = blab.GetModelList(" Lab_Code='"+ op.Project_Lab +"'");
                if (mLab.Count > 0)
                {
                    op.Project_Lab = mLab[0].Lab_Name;
                }
                ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
                List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
                listCClass = eDictionary.GetModelList("DClass = 'shiyanyaoqiu' and Code = '"+op.Project_Require+"'");
                if (listCClass.Count > 0)
                {
                    op.Project_Require = listCClass[0].Name;
                }
                op.OP_Phone = op.Project_StartWeek.ToString()+"--"+op.Project_EndWeek.ToString();
                List<LabMS.Model.ProjectAppointment>listprojectapp = new List<LabMS.Model.ProjectAppointment>();
                ExtendBLL.ProjectAppointment bprojectapp = new ExtendBLL.ProjectAppointment();
                listprojectapp = bprojectapp.GetModelList(" OP_ProjectCode ='"+op.OP_ProjectCode+"'");
                op.OP_OpenType = listprojectapp.Count.ToString();
                listCClass = eDictionary.GetModelList("DClass = 'shiyanleixing' and Code = '" + op.Project_Type + "'");
                if (listCClass.Count > 0)
                {
                    op.Project_Type = listCClass[0].Name;
                }
                if (op.OP_Audit == "0")
                {

                }
                op.OP_Audit = LabMS.Common.Status.GetOpenProjectStatus(op.OP_Audit);

            }

            gv_OpenProjectList.DataSource = listmopproject;
            gv_OpenProjectList.DataBind();
        }
Exemple #29
0
        void bind(LabMS.Model.RecipientsApp recipientsApp)
        {
            Comment.Text = Common.codehelper.Decode(recipientsApp.AppComment);

            tbUserNub.Text = recipientsApp.AppNub;
            tbCNub.Text = recipientsApp.ClassNumber;
            List<LabMS.Model.InstrumentAndConsumables> mconsum = new List<LabMS.Model.InstrumentAndConsumables>();
            LabMS.BLL.InstrumentAndConsumables bconsum = new LabMS.BLL.InstrumentAndConsumables();

            mconsum = bconsum.GetModelList("Numbers='" + recipientsApp.ClassNumber + "'");
            if (mconsum.Count == 0)
            {
                Common.JShelper.JSAlert(Page, "err", "数据错误,请删除此条记录!");
                return;
            }
            try
            {
                lbAllNub.Text = mconsum[0].Quantity.Value.ToString();
            }
            catch
            {
            }
            LabMS.BLL.Lab blab = new LabMS.BLL.Lab();
            List<LabMS.Model.Lab> mLab = new List<LabMS.Model.Lab>();
            mLab = blab.GetModelList("Lab_Code='" + recipientsApp.Laboratory + "'");
            if (mLab.Count > 0)
            {
                tbLabName.Text = mLab[0].Lab_Name;
            }
            tbLabCode.Value = recipientsApp.Laboratory;

            lbCName.Text = recipientsApp.Name;
            try
            {
                tbRecipientsDate.Text = recipientsApp.RecipientTime.Value.ToShortDateString();
            }
            catch { }

            lbTypeNub.Text = recipientsApp.Words;
        }
Exemple #30
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
        }