示例#1
0
        private void CheckKart()//Kart numarasının olması durumunda numaraya göre kart sınıfının verilerini çeker.
        {
            KartlarContext contextKartlar = new KartlarContext();
            List <Kartlar> kartlar        = contextKartlar.GetAllCards();

            ComboBoxItemCollection coll = KartNoTextEdit.Properties.Items;

            coll.Clear();
            coll.BeginUpdate();
            try
            {
                foreach (Kartlar item in kartlar)
                {
                    coll.Add(item._KartNo.ToString());
                }
            }
            finally
            {
                coll.EndUpdate();
            }
            KartNoTextEdit.SelectedIndex = -1;

            if (string.IsNullOrEmpty(KartNoTextEdit.Text))//kart numarası olmadığı durumda tool'lara veri işlemek kapalıdır.
            {
                ToolBoxEdits(false);
            }
        }
示例#2
0
        public static void DataBind(ComboBoxItemCollection collection, IEnumerable dataSource,
                                    string valueMemberName, string tagMemberName)
        {
            if (CollectionUtils.IsNullOrEmpty(dataSource))
            {
                collection.Clear();
                return;
            }
            MemberInfo valueMember = ReflectionUtils.GetInstanceMember <object>(valueMemberName);
            MemberInfo tagMember   = null;

            if (!string.IsNullOrEmpty(tagMemberName))
            {
                tagMember = ReflectionUtils.GetInstanceMember <object>(tagMemberName);
            }
            collection.BeginUpdate();
            try
            {
                throw new NotImplementedException();
            }
            finally
            {
                collection.EndUpdate();
            }
        }
示例#3
0
        private void tabelaWybranychProduktow_Load(object sender, EventArgs e)
        {
            // Zapełnienie kolumn
            this.tabelaWybranychProduktow.DataSource = _asortymenty;
            for (int i = 0; i < this.widokTabeliWybranychProduktow.Columns.Count; i++)
            {
                if (this.widokTabeliWybranychProduktow.Columns[i].FieldName.Equals("Nazwa") ||
                    this.widokTabeliWybranychProduktow.Columns[i].FieldName.Equals("CenaEwidencyjna"))
                {
                    this.widokTabeliWybranychProduktow.Columns[i].Visible = true;
                }
                else
                {
                    this.widokTabeliWybranychProduktow.Columns[i].Visible = false;
                }
            }
            var kolumnaIlosc = new KolumnaIlosc(widokTabeliWybranychProduktow);

            _klienci = _serwisPodmiotow.PodajWszystkieFirmy();

            // Zapełnienie pola wyboru
            ComboBoxItemCollection zbiorKlientowDoWyboru = this.poleWyboruKlienta.Properties.Items;

            zbiorKlientowDoWyboru.BeginUpdate();
            for (int i = 0; i < _klienci.Length; i++)
            {
                zbiorKlientowDoWyboru.Add(new KlientInfo(_klienci[i]));
            }
            zbiorKlientowDoWyboru.EndUpdate();
        }
示例#4
0
        private LayoutControlItem createMetadataProviderLayoutControlItem(LayoutControlGroup lg)
        {
            LayoutControlItem lci = lg.AddItem( );

            lci.Name = "lciMetadataProvider";
            lci.Text = "Metadata Provider";
            ComboBoxEdit o = (ComboBoxEdit)(lci.Control = new ComboBoxEdit( ));

            {
                ComboBoxItemCollection coll = o.Properties.Items;
                coll.BeginUpdate( );
                try
                {
                    string[] name = Enum.GetNames(typeof(MetadataProviderEnum));
                    for (int i = 0; i < name.Length; i++)
                    {
                        string tc = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(name[i]);
                        coll.Add(tc);
                    }
                    o.SelectedIndex = 0;
                }
                finally
                {
                    coll.EndUpdate( );
                }
            }
            return(lci);
        }
示例#5
0
        private void frmChuyenBan_Load(object sender, EventArgs e)
        {
            lsBanDangAn = BanAn_BUS.selectBanAnTheoTrangThai(1, int.Parse(frmMain.nhanVien.MaNH.Trim()), Mode);
            ComboBoxItemCollection coll = cbbox_BanCanChuyen.Properties.Items;

            coll.BeginUpdate();

            foreach (BanAn_DTO ban in lsBanDangAn)
            {
                String content = "Bàn " + ban.MaBan;
                coll.Add(content);
                coll.EndUpdate();
            }

            lsBanTrong = BanAn_BUS.selectBanAnTheoTrangThai(0, int.Parse(frmMain.nhanVien.MaNH.Trim()), Mode);
            ComboBoxItemCollection coll2 = cbbox_ChuyenSangBan.Properties.Items;

            coll2.BeginUpdate();

            foreach (BanAn_DTO ban in lsBanTrong)
            {
                String content = "Bàn " + ban.MaBan;
                coll2.Add(content);
                coll2.EndUpdate();
            }
            indexBanDangAn = indexBanTrong = -1;
        }
示例#6
0
 public static void FillComboComponentType(ComboBoxItemCollection coll)
 {
     coll.BeginUpdate();
     for (int i = 0; i < components.Length; ++i)
     {
         coll.Add(components[i]);
     }
     coll.EndUpdate();
 }
示例#7
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            lblInfo.Text    = Reader.TestConnection(memConnString.Text);
            lblInfo.Visible = true;

            ComboBoxItemCollection itemsCollection = cmbServer.Properties.Items;

            itemsCollection.BeginUpdate();

            lblInfo.Text = "Konekcija uspješna!";
        }
        private void InitComboHtmlExportType()
        {
            ComboBoxItemCollection collExportHtml = edtExportHtmlType.Properties.Items;

            collExportHtml.BeginUpdate();
            collExportHtml.Clear();
            collExportHtml.Add(ExportRootTag.Body);
            collExportHtml.Add(ExportRootTag.Html);
            collExportHtml.EndUpdate();
            edtExportHtmlType.SelectedIndex = 0;
            htmlExportType = ExportRootTag.Body;
        }
示例#9
0
        private void FormZamowienia_Load(object sender, EventArgs e)
        {
            // Zapełnienie pola wyboru
            ComboBoxItemCollection zbiorKlientowDoWyboru = this.comboBoxEdit1.Properties.Items;

            zbiorKlientowDoWyboru.BeginUpdate();
            foreach (var k in _kontrahenci)
            {
                zbiorKlientowDoWyboru.Add(k);
            }
            zbiorKlientowDoWyboru.EndUpdate();
        }
        private void InitComboCssExportType()
        {
            ComboBoxItemCollection collCssStyle = edtCssStyleType.Properties.Items;

            collCssStyle.BeginUpdate();
            collCssStyle.Clear();
            collCssStyle.Add(CssPropertiesExportType.Style);
            collCssStyle.Add(CssPropertiesExportType.Link);
            collCssStyle.Add(CssPropertiesExportType.Inline);
            collCssStyle.EndUpdate();
            edtCssStyleType.SelectedIndex = 0;
            cssExportType = CssPropertiesExportType.Style;
        }
示例#11
0
        private void load_CbboxBanTrong()
        {
            ComboBoxItemCollection coll = cbboxChuyenVaoBan.Properties.Items;

            coll.BeginUpdate();

            for (int i = 0; i < lsBan.Count; i++)
            {
                String content = "Bàn " + lsBan[i].MaBan;
                coll.Add(content);
                coll.EndUpdate();
            }
        }
示例#12
0
        /// <summary>
        /// Gridde alanların listelenmesi ile alan isimleri de ortaya çıkar. Bu alan isimleri database'deki alan
        /// isimleri ile eşleştirme amacıyla tüm comboboxlara yüklenir. Daha sonra ekleme için, gridde'ki hangi alan
        /// database'deki hangi alana eklenecek seçilir.
        /// </summary>
        /// <param name="cmb"></param>
        private void BaslikYukle(ComboBoxEdit cmb)
        {
            ComboBoxItemCollection data = cmb.Properties.Items;

            data.Clear();
            data.BeginUpdate();
            data.Add("");
            for (int i = 0; i < gridListe.Columns.Count; i++)
            {
                data.Add(gridListe.Columns[i].FieldName);
            }
            data.EndUpdate();
            cmb.SelectedIndex = 0;
        }
示例#13
0
        private void nhom()
        {
            ComboBoxItemCollection item = comboBoxEdit1.Properties.Items;

            item.BeginUpdate();
            using (qlpk1Entities2 c = new qlpk1Entities2())
            {
                foreach (var i in c.NhomDoiTuongs.Select(a => a.MaNhom))
                {
                    item.Add(i);
                }
            }
            item.EndUpdate();
        }
示例#14
0
        private void khoa()
        {
            ComboBoxItemCollection item = comboBoxEdit2.Properties.Items;

            item.BeginUpdate();
            using (qlpk1Entities2 c = new qlpk1Entities2())
            {
                foreach (var i in c.Khoas.Select(a => a.MaKhoa))

                {
                    item.Add(i);
                }
            }
            item.EndUpdate();
        }
示例#15
0
        void load()
        {
            var b = c.Khoas.Select(a => a.TenKhoa);

            ComboBoxItemCollection item = cbNhom.Properties.Items;

            item.BeginUpdate();
            using (qlpk1Entities2 c = new qlpk1Entities2())
            {
                foreach (var i in b)
                {
                    item.Add(i);
                }
            }
            item.EndUpdate();
        }
        void PopulateComboBoxWithBuiltInTableStyles(IWorkbook workbook)
        {
            // Add names of all built-in table styles contained in the workbook to the combo box.
            ComboBoxItemCollection comboBoxItems = comboBuiltInTableStyles.Properties.Items;

            comboBoxItems.BeginUpdate();
            try {
                Array builtInTableStyleIds = Enum.GetValues(typeof(BuiltInTableStyleId));
                for (int i = 0; i < builtInTableStyleIds.Length; i++)
                {
                    comboBoxItems.Add(workbook.TableStyles[(BuiltInTableStyleId)builtInTableStyleIds.GetValue(i)].Name);
                }
            }
            finally {
                comboBoxItems.EndUpdate();
            }
        }
示例#17
0
        private void LoadFlag()
        {
            this.cb_Flag.Properties.Items.Clear();
            ComboBoxItemCollection coll = this.cb_Flag.Properties.Items;

            coll.BeginUpdate();
            try
            {
                coll.Add("是");
                coll.Add("否");
            }
            finally
            {
                coll.EndUpdate();
            }
            this.cb_GoodsType.SelectedIndex = 0;
        }
示例#18
0
        private void comboBoxinit()
        {
            ComboBoxItemCollection coll = comboBoxCarList.Properties.Items;

            coll.BeginUpdate();
            try
            {
                //coll.Add(new PersonInfo("Sven"));
                //coll.Add(new PersonInfo("Cheryl"));
                //coll.Add(new PersonInfo("Dirk"));
            }
            finally
            {
                coll.EndUpdate();
            }
            comboBoxCarList.SelectedIndex = -1;

            Controls.Add(comboBoxCarList);
        }
示例#19
0
        public void ShowMaterialType(List <string> typeList)
        {
            this.cb_GoodsType.Properties.Items.Clear();
            ComboBoxItemCollection coll = this.cb_GoodsType.Properties.Items;

            coll.BeginUpdate();
            try
            {
                for (int i = 0; i < typeList.Count; i++)
                {
                    coll.Add(typeList[i]);
                }
            }
            finally
            {
                coll.EndUpdate();
            }
            this.cb_GoodsType.SelectedIndex = 0;
        }
示例#20
0
        private void InitializeIndexList()
        {
            List <IndexSystem>     list = this.indexService.FindAllIndexSystem();
            ComboBoxItemCollection coll = this.cmbIndexSystemNames.Properties.Items;

            try
            {
                coll.BeginUpdate();
                foreach (IndexSystem item in list)
                {
                    coll.Add(item);
                }
            }
            finally
            {
                coll.EndUpdate();
            }
            this.cmbIndexSystemNames.SelectedIndex = 0;
        }
示例#21
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            //ComboBoxEdit combo = new ComboBoxEdit();
            ComboBoxItemCollection coll = cmbDB.Properties.Items;

            coll.BeginUpdate();

            try
            {
                coll.Add("localhost");
                //coll.Add("127.0.0.1");
            }
            finally
            {
                coll.EndUpdate();
            }
            cmbDB.Reset();
            cmbDB.SelectedIndex = 0;
            Controls.Add(cmbDB);
        }
        public CreateItemVersionSelection(LeagueBuildStatsForm form, List <string> versions)
        {
            var matches = form.Controls.Find("cmbBoxEditItemVersion", true);

            foreach (Control c in matches)
            {
                ComboBoxEdit           cmbBoxItemVersions = (ComboBoxEdit)c;
                ComboBoxItemCollection coll = cmbBoxItemVersions.Properties.Items;
                coll.BeginUpdate();
                try
                {
                    foreach (string ver in versions)
                    {
                        coll.Add(ver);
                    }
                }
                finally
                {
                    coll.EndUpdate();
                }
            }
        }
        private void LoadDanhSachTho()
        {
            BUL_Tho    bulTho   = new BUL_Tho();
            List <THO> listThos = bulTho.GetAllWorkerList();

            comboBoxEditTenTho.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
            _comboboxItemsTho = comboBoxEditTenTho.Properties.Items;
            _comboboxItemsTho.BeginUpdate();
            try
            { foreach (var item in listThos)
              {
                  ContainerItem tho = new ContainerItem();
                  tho.Text  = item.TenTho;
                  tho.Value = item;
                  _comboboxItemsTho.Add(tho);
              }
            }
            finally
            {
                _comboboxItemsTho.EndUpdate();
            }
        }
示例#24
0
        private void Init()
        {
            EducationalServices    eduServices = new EducationalServices();
            ComboBoxItemCollection coll        = comboBoxEdit1.Properties.Items;

            coll.BeginUpdate();
            try
            {
                List <Educational> EList = eduServices.GetAllEducationals();
                foreach (Educational edu in eduServices.GetAllEducationals())
                {
                    coll.Add(edu.EducationalName);
                }
            }
            finally
            {
                coll.EndUpdate();
            }
            comboBoxEdit1.SelectedIndex = -1;

            Application.DoEvents();
        }
示例#25
0
        private void comboBoxEdit2_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboBoxEdit4.Properties.Items.Clear();

            ComboBoxItemCollection item = comboBoxEdit4.Properties.Items;

            item.BeginUpdate();
            using (qlpk1Entities2 c = new qlpk1Entities2())
            {
                String k     = comboBoxEdit2.Properties.GetDisplayText(comboBoxEdit2);
                var    query = from e1 in c.BacSis
                               where e1.Khoa.Equals(k)
                               select e1.MaBS;

                foreach (var i in query)

                {
                    item.Add(i);
                }
            }
            item.EndUpdate();
        }
示例#26
0
        private void comboBoxEdit3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbAdapterType.SelectedIndex == (int)CANBusAdapter.COMBI ||
                cbAdapterType.SelectedIndex == (int)CANBusAdapter.ELM327 ||
                cbAdapterType.SelectedIndex == (int)CANBusAdapter.JUST4TRIONIC ||
                cbAdapterType.SelectedIndex == (int)CANBusAdapter.MXWIFI)
            {
                btnAdapterConfiguration.Enabled = true;
            }
            else
            {
                btnAdapterConfiguration.Enabled = false;
            }

            if (cbAdapterType.SelectedIndex != -1)
            {
                string[] adapters = ITrionic.GetAdapterNames((CANBusAdapter)cbAdapterType.SelectedIndex);
                ComboBoxItemCollection collection = cbAdapter.Properties.Items;
                collection.BeginUpdate();
                collection.Clear();
                foreach (string adapter in adapters)
                {
                    collection.Add(adapter);
                }
                collection.EndUpdate();

                if (adapters.Length > 0)
                {
                    cbAdapter.SelectedIndex = 0;
                    cbAdapter.Enabled       = true;
                }
                else
                {
                    cbAdapter.SelectedIndex = -1;
                    cbAdapter.Enabled       = false;
                }
            }
        }
示例#27
0
        private LayoutControlItem createSyntaxProviderLayoutControlItem(LayoutControlGroup lg)
        {
            LayoutControlItem lci = lg.AddItem( );

            lci.Name = "lciMetadataProvider";
            lci.Text = "Metadata Provider";
            ComboBoxEdit o = (ComboBoxEdit)(lci.Control = new ComboBoxEdit( ));

            {
                ComboBoxItemCollection coll = o.Properties.Items;
                coll.BeginUpdate( );
                try
                {
                    coll.AddRange(SyntaxProviderType.ToArray);
                    o.SelectedIndex = 0;
                }
                finally
                {
                    coll.EndUpdate( );
                }
            }
            return(lci);
        }
        private void LoadTho(int matho)
        {
            BUL_Tho    bulTho   = new BUL_Tho();
            List <THO> listThos = bulTho.GetAllWorkerList();

            comboBoxEditTenTho.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
            _comboboxItemsTho = comboBoxEditTenTho.Properties.Items;
            _comboboxItemsTho.BeginUpdate();
            try
            { foreach (var item in listThos)
              {
                  ContainerItem tho = new ContainerItem();
                  tho.Text  = item.TenTho;
                  tho.Value = item;
                  _comboboxItemsTho.Add(tho);
              }
            }
            finally
            {
                _comboboxItemsTho.EndUpdate();
            }
            comboBoxEditTenTho.SelectedIndex = listThos.IndexOf(listThos.Find(i => i.MaTho == matho));
        }
示例#29
0
        void Load_ComboBox_DonViTinh()
        {
            listDonViTinh = new List <DonViTinh_View>();

            listDonViTinh = DonViTinh_DAL.getAll_DonViTinh();

            ComboBoxItemCollection items = cbDonViTinh.Properties.Items;

            items.BeginUpdate();

            try
            {
                for (int i = 0; i < listDonViTinh.Count; i++)
                {
                    items.Add(listDonViTinh[i].TenDonViTinh.ToString());
                }
            }
            finally
            {
                items.EndUpdate();
            }
            cbDonViTinh.Properties.AutoComplete = true;
        }
示例#30
0
        private void frmThemMonAn_Load(object sender, EventArgs e)
        {
            dtLoaiMonAn = LoaiMonAn_BUS.DocLoaiMonAn();
            ComboBoxItemCollection coll = cboLoaiMonAn.Properties.Items;

            coll.BeginUpdate();

            foreach (DataRow row in dtLoaiMonAn.Rows)
            {
                coll.Add((String)row.ItemArray[1]);
                coll.EndUpdate();
            }
            //cboLoaiMonAn.SelectedIndex = 0;

            dtMonAn     = new DataTable();
            dtMonAnChon = new DataTable();

            dtMonAnChon.Columns.Add("MaMon", System.Type.GetType("System.Int32"));
            dtMonAnChon.Columns.Add("TenMon", System.Type.GetType("System.String"));
            dtMonAnChon.Columns.Add("DonViTinh", System.Type.GetType("System.String"));
            dtMonAnChon.Columns.Add("SoLuong", System.Type.GetType("System.Int32"));
            dtMonAnChon.Columns.Add("Gia", System.Type.GetType("System.Double"));
        }