Пример #1
0
        private void comb_benchSet3_SelectedIndexChanged(object sender, EventArgs e)
        {
            benchBll = new BenchSetBLL();
            BenchSet bSet = benchBll.GetBenchSetByName(comb_benchSet3.SelectedItem.ToString(), _users.Id);

            tb_benchName3.Text    = bSet.BenchName;
            tb_benchRange3.Text   = bSet.BenchRange;
            tb_benchSerial3.Text  = bSet.BenchSerial;
            dt_benchExpire3.Value = bSet.Expire;
            tb_benchSn3.Text      = bSet.BenchSn;
            tb_notSure3.Text      = bSet.Notsure;
        }
Пример #2
0
        public void InitAutoComplete()
        {
            DateTime expire = DateTime.Now;

            expire          = expire.AddYears(1);
            expire          = expire.AddDays(-1);
            dt_expire.Value = expire;

            //器具名称下拉框初始化,
            autoBll = new AutoCompleteBLL();
            string[] items = autoBll.GetInstNameList();
            tbd_instName.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            tbd_instName.AutoCompleteCustomSource.AddRange(items);
            tbd_instName.Items.AddRange(items);

            ////制造厂
            items = autoBll.GetMadeByList();
            tbd_madeBy.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            tbd_madeBy.AutoCompleteCustomSource.AddRange(items);
            tbd_madeBy.Items.AddRange(items);

            ////检定依据
            items = autoBll.GetAccordingList();
            tb_accordingTo.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            tb_accordingTo.AutoCompleteCustomSource.AddRange(items);
            tb_accordingTo.Items.AddRange(items);

            ////专用证书
            items = autoBll.GetUsedLicense();
            tb_license.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            tb_license.AutoCompleteCustomSource.AddRange(items);
            tb_license.Items.AddRange(items);


            //常用标准器具
            benchBll = new BenchSetBLL();
            IList <BenchSet> bSets = benchBll.GetAllBenchSet(_users.Id);

            comb_benchSet1.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            comb_benchSet2.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            comb_benchSet3.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            foreach (BenchSet bSet in bSets)
            {
                comb_benchSet1.Items.Add(bSet.SetName);
                comb_benchSet1.AutoCompleteCustomSource.Add(bSet.SetName);
                comb_benchSet2.Items.Add(bSet.SetName);
                comb_benchSet2.AutoCompleteCustomSource.Add(bSet.SetName);
                comb_benchSet3.Items.Add(bSet.SetName);
                comb_benchSet3.AutoCompleteCustomSource.Add(bSet.SetName);
            }
        }