Пример #1
0
 public void bind(string strCode)
 {
     ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
     List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
     listCClass = eDictionary.GetItemListByDClass(strCode);
     GridViewDic.DataSource = listCClass;
     GridViewDic.DataBind();
 }
Пример #2
0
 /// <summary>
 /// 根据Name返回DClass的值,假设性别的CODE是201,DClass=201
 /// </summary>
 /// <param name="Name">返回code的值</param>
 public string GetDcodeByName(string Name)
 {
     string str = "Name='"+Name+"'";
     List<LabMS.Model.Dictionary> listd = new List<LabMS.Model.Dictionary>();
     Dictionary dt = new Dictionary();
     listd = dt.GetModelList(str);
     return listd[0].Code;
 }
Пример #3
0
 /// <summary>
 /// 获得性别码,从基础字典里面
 /// </summary>
 /// <returns></returns>
 public string GetSexCode(string sexcode)
 {
     string DClass=GetDClassFromDictorary("性别");
     string str = "DClass='" + DClass + "' and Code='" + sexcode + "'";
     Dictionary BD = new Dictionary();
     List<LabMS.Model.Dictionary> listD = new List<LabMS.Model.Dictionary>();
     listD=BD.GetModelList(str);
     return listD[0].Name;  //如果Name表示的男,女
 }
Пример #4
0
        public void bind()
        {
            tbCreatedDate.Text = DateTime.Today.ToLongDateString();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            ddlCClass.DataSource = listCClass;
            ddlCClass.DataTextField = "Name";
            ddlCClass.DataValueField = "Code";
            ddlCClass.DataBind();

            listCClass = eDictionary.GetItemListByDClass("shebeilaiyuan");
            ddlSource.DataSource = listCClass;
            ddlSource.DataTextField = "Name";
            ddlSource.DataValueField = "Code";
            ddlSource.DataBind();

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

            listCClass = eDictionary.GetItemListByDClass("jingfeikemu");
            ddlFundsSubject.DataSource = listCClass;
            ddlFundsSubject.DataTextField = "Name";
            ddlFundsSubject.DataValueField = "Code";
            ddlFundsSubject.DataBind();

            listCClass = eDictionary.GetItemListByDClass("dangwei");
            ddlModle.DataSource = listCClass;
            ddlModle.DataTextField = "Name";
            ddlModle.DataValueField = "Code";
            ddlModle.DataBind();

            //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 ");
            //ddlAddress.DataSource = mLab;
            //ddlAddress.DataTextField = "Lab_Name";
            //ddlAddress.DataValueField = "Lab_Code";
            //ddlAddress.DataBind();

            ExtendBLL.InstrumentAndConsumables eConsum = new ExtendBLL.InstrumentAndConsumables();
            int iMaxCID = eConsum.GetMaxId();
            MaxCID.Value = iMaxCID.ToString("D10");
            tbInstrumentNum.Text = iMaxCID.ToString("D10");
        }
Пример #5
0
        public void bindDDL(ExtendModule.InstrumentAndConsumables mconsum)
        {
            labelCreatDate.Text = DateTime.Today.ToShortDateString();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();
            listCClass = eDictionary.GetItemListByDClass("haocaileibie");
            ddlCClass.DataSource = listCClass;
            ddlCClass.DataTextField = "Name";
            ddlCClass.DataValueField = "Code";
            ddlCClass.DataBind();
            ddlCClass.SelectedValue = mconsum.ClassNumber;

            listCClass = eDictionary.GetItemListByDClass("shebeilaiyuan");
            ddlComeFrom.DataSource = listCClass;
            ddlComeFrom.DataTextField = "Name";
            ddlComeFrom.DataValueField = "Code";
            ddlComeFrom.DataBind();
            ddlComeFrom.SelectedValue = mconsum.Source;

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

            listCClass = eDictionary.GetItemListByDClass("jingfeikemu");
            ddlFundsSubject.DataSource = listCClass;
            ddlFundsSubject.DataTextField = "Name";
            ddlFundsSubject.DataValueField = "Code";
            ddlFundsSubject.DataBind();
            ddlFundsSubject.SelectedValue = mconsum.FundsSubject;

            listCClass = eDictionary.GetItemListByDClass("dangwei");
            ddlModle.DataSource = listCClass;
            ddlModle.DataTextField = "Name";
            ddlModle.DataValueField = "Code";
            ddlModle.DataBind();
            ddlModle.SelectedValue = mconsum.Measurement;

            tbLocation.Text = mconsum.LabName;
            tbLocationCode.Text  = mconsum.StockLocation;
        }
Пример #6
0
        public void bindDDL(ExtendModule.InstrumentAndConsumables mvaluables)
        {
            tbCreatedDate.Text = DateTime.Today.ToShortDateString();
            ExtendBLL.Dictionary eDictionary = new ExtendBLL.Dictionary();
            List<Model.Dictionary> listCClass = new List<LabMS.Model.Dictionary>();

            listCClass = eDictionary.GetItemListByDClass("shebeilaiyuan");
            ddlSource.DataSource = listCClass;
            ddlSource.DataTextField = "Name";
            ddlSource.DataValueField = "Code";
            ddlSource.DataBind();
            ddlSource.SelectedValue = mvaluables.Source;

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

            listCClass = eDictionary.GetItemListByDClass("shebeizhuangtai");
            ddlPresentSituation.DataSource = listCClass;
            ddlPresentSituation.DataTextField = "Name";
            ddlPresentSituation.DataValueField = "Code";
            ddlPresentSituation.DataBind();
            ddlPresentSituation.SelectedValue = mvaluables.ResponesoblePerson;

            listCClass = eDictionary.GetItemListByDClass("jingfeikemu");
            ddlFundsSubject.DataSource = listCClass;
            ddlFundsSubject.DataTextField = "Name";
            ddlFundsSubject.DataValueField = "Code";
            ddlFundsSubject.DataBind();
            ddlFundsSubject.SelectedValue = mvaluables.FundsSubject;

            tbLocation.Text = mvaluables.LabName;
            tbLocationCode.Text = mvaluables.StockLocation;
        }