Example #1
0
        string ADMIN_ID         = string.Empty; //修改时指示具体的行数据
        public FrmAccountAdd(string strOperationFlag, Dictionary <string, string> dic)
        {
            InitializeComponent();
            //设置账号类型下拉框
            ACCOUNT_TYPE.Properties.AutoComplete    = true;
            ACCOUNT_TYPE.Properties.CycleOnDblClick = true;
            ComboBoxItemCollection coll = ACCOUNT_TYPE.Properties.Items;

            coll.Add("员工");
            coll.Add("管理员");


            this.strOperationFlag = strOperationFlag;
            if (strOperationFlag.Equals("modify"))
            {
                //设置窗口标题
                this.Text = "修改账号信息";
                //获取需要修改的信息
                this.ADMIN_ID          = dic["账号编号"];
                this.ACCOUNT.Text      = dic["账号"];
                this.ACCOUNT_TYPE.Text = dic["账号类型"];
                this.NAME.Text         = dic["真实姓名"];
                this.PASSWORD.Text     = dic["密码"];
            }
            else
            {
                //设置窗口标题
                this.Text = "添加账号信息";
                this.ACCOUNT.Focus();
            }
        }
Example #2
0
        private void CargarAgentesExistentes()
        {
            ComboBoxItemCollection coll = ddlAgente.Properties.Items;

            IList <Entidades.Paperless.PaperlessAgente> listAgentes = new List <Entidades.Paperless.PaperlessAgente>();

            listAgentes = LogicaNegocios.Paperless.Paperless.ObtenerAgentes(Entidades.Enums.Enums.Estado.Habilitado);

            coll = ddlAgente.Properties.Items;
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in listAgentes)
            {
                coll.Add(list);
            }
            ddlAgente.SelectedIndex           = 0;
            ddlAgente.Properties.AutoComplete = true;

            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();

            auto.Add(txtAgente.Text);
            txtAgente.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            txtAgente.AutoCompleteSource = AutoCompleteSource.CustomSource;
            foreach (var list in listAgentes)
            {
                auto.Add(list.Nombre);
            }
            txtAgente.AutoCompleteCustomSource = auto;
        }
Example #3
0
        public FrmAccountEdit()
        {
            InitializeComponent();

            //设置账号类型下拉框
            ACCOUNT_TYPE.Properties.AutoComplete    = true;
            ACCOUNT_TYPE.Properties.CycleOnDblClick = true;
            ComboBoxItemCollection coll = ACCOUNT_TYPE.Properties.Items;

            coll.Add("员工");
            coll.Add("管理员");

            //设置gridcontrol
            //行高22
            gridView1.RowHeight = 40;
            //不允许编辑
            gridView1.OptionsBehavior.Editable = false;
            //不允许用户拖动列和
            gridView1.OptionsCustomization.AllowColumnMoving = false;
            //不显示右键菜单
            gridView1.OptionsMenu.EnableColumnMenu = false;
            gridControl1.UseEmbeddedNavigator      = true;//设置滑动条
            gridControl1.EmbeddedNavigator.Buttons.Append.Visible     = false;
            gridControl1.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            gridControl1.EmbeddedNavigator.Buttons.EndEdit.Visible    = false;
            gridControl1.EmbeddedNavigator.Buttons.Remove.Visible     = false;
            //gridControl1.EmbeddedNavigator.TextLocation = DevExpress.XtraEditors.NavigatorButtonsTextLocation.End;
            gridControl1.EmbeddedNavigator.Dock = DockStyle.Bottom;

            //绑定数据
            BindGridView();
        }
Example #4
0
        /* //获取检测技术列表
         * private void setTechnolog()
         * {
         *   DataSet ds = new DataSet();
         *   ds = dao.setTechnologList();
         *   Detection_Technology_NAME.Properties.NullText = "";
         *   this.Detection_Technology_NAME.Properties.DataSource = ds.Tables[0];
         *   this.Detection_Technology_NAME.Properties.ValueMember = "编号";
         *   this.Detection_Technology_NAME.Properties.DisplayMember = "检测技术";
         *   //Detection_Technology_NAME.EditValue
         * }*/

        //获取是否贯穿列表
        private void setPenetration()
        {
            //IF_PENETRATION.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
            IF_PENETRATION.Properties.AutoComplete    = true;
            IF_PENETRATION.Properties.CycleOnDblClick = true;
            ComboBoxItemCollection coll = IF_PENETRATION.Properties.Items;

            coll.Add("是");
            coll.Add("否");
        }
Example #5
0
        public static void CargaComboBoxEnumJornada(ComboBoxEdit combo)
        {
            ComboBoxItemCollection coll = combo.Properties.Items;

            coll.Add(ObtenerPrimerItem());
            foreach (string jornada in Enum.GetNames(typeof(Entidades.Enums.Enums.Jornadas)))
            {
                coll.Add(jornada);
            }
            combo.SelectedIndex = 0;
        }
Example #6
0
        private void CargarUsuarios()
        {
            ComboBoxItemCollection coll  = ddlUsuario1.Properties.Items;
            ComboBoxItemCollection coll2 = ddlUsuario2.Properties.Items;
            IList <Entidades.Usuarios.clsUsuario> listusuarios = new List <clsUsuario>();

            Entidades.GlobalObject.ResultadoTransaccion resultado = new ResultadoTransaccion();

            resultado = LogicaNegocios.Usuarios.clsUsuarios.ListarUsuarios(Enums.Estado.Habilitado,
                                                                           Enums.CargosUsuarios.Todos);
            if (resultado.Estado == Enums.EstadoTransaccion.Aceptada)
            {
                listusuarios = (IList <clsUsuario>)resultado.ObjetoTransaccion;
            }



            coll  = ddlUsuario1.Properties.Items;
            coll2 = ddlUsuario2.Properties.Items;
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            coll2.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in listusuarios)
            {
                coll.Add(list);
                coll2.Add(list);
            }
            ddlUsuario1.SelectedIndex           = 0;
            ddlUsuario1.Properties.AutoComplete = true;

            ddlUsuario2.SelectedIndex           = 0;
            ddlUsuario2.Properties.AutoComplete = true;


            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();

            auto.Add(txtUsuario1.Text);
            txtUsuario1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            txtUsuario1.AutoCompleteSource = AutoCompleteSource.CustomSource;
            foreach (var list in listusuarios)
            {
                auto.Add(list.ToString());
            }
            txtUsuario1.AutoCompleteCustomSource = auto;

            auto = new AutoCompleteStringCollection();
            auto.Add(txtUsuario2.Text);
            txtUsuario2.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            txtUsuario2.AutoCompleteSource = AutoCompleteSource.CustomSource;
            foreach (var list in listusuarios)
            {
                auto.Add(list.ToString());
            }
            txtUsuario2.AutoCompleteCustomSource = auto;
        }
Example #7
0
        private void CargarVendedores()
        {
            var res = LogicaNegocios.Usuarios.clsUsuarios.ListarUsuarios(Enums.Estado.Habilitado, Enums.CargosUsuarios.UsuarioSalesLead);
            var listVendedores = (IList<clsUsuario>)res.ObjetoTransaccion;
            ComboBoxItemCollection coll = cboVendedores.Properties.Items;
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in listVendedores)
                coll.Add(list);

            cboVendedores.SelectedIndex = 0;
        }
Example #8
0
        private void CargarPaises()
        {
            IList <clsPais>        paises = clsParametros.ListarPaises();
            ComboBoxItemCollection coll   = cboPais.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in paises)
            {
                coll.Add(list);
            }
            cboPais.SelectedIndex = 0;
        }
Example #9
0
        public static void CargaComboBoxParametros(clsParametrosInfo lista, ComboBoxEdit combo)
        {
            ComboBoxItemCollection coll = combo.Properties.Items;

            coll.Add(ObtenerPrimerItem());

            foreach (var list in lista.Items)
            {
                coll.Add(list);
            }
            combo.SelectedIndex = 0;
        }
Example #10
0
        private void CargarMonedas()
        {
            IList <Entidades.Tarifado.clsTipoMoneda> lstMonedas = clsParametros.ListarMonedas();
            ComboBoxItemCollection coll = cboMoneda.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in lstMonedas)
            {
                coll.Add(list);
            }
            this.cboMoneda.SelectedIndex = 0;
        }
Example #11
0
        public static void CargaCombo(IList <object> lista, ComboBoxEdit combo)
        {
            ComboBoxItemCollection coll = combo.Properties.Items;

            coll.Add(ObtenerPrimerItem());

            foreach (var list in lista)
            {
                coll.Add(list);
            }
            combo.SelectedIndex = 0;
        }
Example #12
0
        /// <summary>
        /// Setup the control for specified view
        /// </summary>
        /// <param name="view"></param>

        public void Setup(
            DataTableMapMsx dataTableMap,
            EventHandler callerEditValueChangedEventHandler = null)
        {
            InSetup      = true;
            DataTableMap = dataTableMap;

            CallerEditValueChangedHandler = callerEditValueChangedEventHandler;

            QueryTablesComboBox.Text         = "";
            QueryTablesComboBox.SelectedItem = null;

            ComboBoxItemCollection items = QueryTablesComboBox.Properties.Items;

            items.Clear();

            QueryTablesComboBox.Text = "";

            AssertMx.IsNotNull(Query, "Query");

            foreach (QueryTable qtEnum in Query.Tables)
            {
                items.Add(new ComboBoxItem(new LabeledUiItem(qtEnum.ActiveLabel, qtEnum)));
            }

            items.Add(AllTablesItem);

            items.Add(NoTablesItem);

            QueryTable qt = DataTableMap?.QueryTable;

            if (dataTableMap.IsMappedToSingleQueryTable)
            {
                QueryTablesComboBox.Text         = qt.ActiveLabel;
                QueryTablesComboBox.SelectedItem = new LabeledUiItem(qt.ActiveLabel, qt);
            }

            else if (dataTableMap.IsMappedToAllQueryTables)             // if cols are mapped assume all tables
            {
                QueryTablesComboBox.Text         = AllTablesItem.Label;
                QueryTablesComboBox.SelectedItem = AllTablesItem;
            }

            else             // not mapped to any tables
            {
                QueryTablesComboBox.Text         = NoTablesItem.Label;
                QueryTablesComboBox.SelectedItem = NoTablesItem;
            }

            InSetup = false;

            return;
        }
        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;
        }
Example #14
0
        private void ListarTiposActividad()
        {
            var Tipos = clsAsuntoTipoActividad.ListarTipoActividad();

            ComboBoxItemCollection coll = cboActividadFollowUp.Properties.Items;

            coll.Add(ProyectoCraft.WinForm.Utils.Utils.ObtenerPrimerItem());
            foreach (var list in Tipos)
            {
                coll.Add(list);
            }
            cboActividadFollowUp.SelectedIndex = 0;
        }
Example #15
0
        private void ListarTiposActividad()
        {
            var Tipos = LogicaNegocios.Ventas.Actividades.clsAsuntoTipoActividad.ListarTipoActividad();

            ComboBoxItemCollection coll = cboActividadFollowUp.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in Tipos)
            {
                coll.Add(list);
            }
            cboActividadFollowUp.SelectedIndex = 0;
        }
        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;
        }
Example #17
0
        private void ListarEstados()
        {
            IList <Entidades.Calendario.clsVisitaEstado> estados =
                LogicaNegocios.Calendarios.clsCalendarios.ListarVisitaEstados();

            ComboBoxItemCollection coll = CboEstado.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in estados)
            {
                coll.Add(list);
            }
            CboEstado.SelectedIndex = 0;
        }
Example #18
0
        private void CargarEstados()
        {
            IList <Entidades.Paperless.PaperlessEstado> estados =
                LogicaNegocios.Paperless.Paperless.ObtenerEstadosPaperless(Enums.Estado.Habilitado);

            ComboBoxItemCollection coll = ddlEstado.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in estados)
            {
                coll.Add(list);
            }
            ddlEstado.SelectedIndex = 0;
        }
Example #19
0
        private void cargarComunas(Int64 idCiudad)
        {
            IList <clsComuna> comunas = clsParametros.ListarComunas(idCiudad);

            ComboBoxItemCollection coll = cboComuna.Properties.Items;

            coll.Clear();
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in comunas)
            {
                coll.Add(list);
            }
            cboComuna.SelectedIndex = 0;
        }
Example #20
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;
        }
Example #21
0
        private void CargarClasificaciones()
        {
            IList <clsCuentaclasificacion> clasificaciones =
                LogicaNegocios.Clientes.clsCuentas.ListarClasificaciones(Enums.Estado.Habilitado);

            ComboBoxItemCollection coll = cboCategoria.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in clasificaciones)
            {
                coll.Add(list);
            }
            cboCategoria.SelectedIndex = 0;
        }
Example #22
0
        private void CargarCiudades(Int64 idPais)
        {
            ciudades = clsParametros.ListarCiudades(idPais);

            ComboBoxItemCollection coll = cboCiudad.Properties.Items;

            coll.Clear();
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in ciudades)
            {
                coll.Add(list);
            }
            cboCiudad.SelectedIndex = 0;
        }
Example #23
0
        private void CargarVendedores()
        {
            Entidades.GlobalObject.ResultadoTransaccion res            = LogicaNegocios.Usuarios.clsUsuarios.ListarUsuarios(Entidades.Enums.Enums.Estado.Habilitado, Entidades.Enums.Enums.CargosUsuarios.Vendedor);
            IList <Entidades.Usuarios.clsUsuario>       listVendedores = (IList <Entidades.Usuarios.clsUsuario>)res.ObjetoTransaccion;

            ComboBoxItemCollection coll = cboVendedores.Properties.Items;

            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in listVendedores)
            {
                coll.Add(list);
            }
            cboVendedores.SelectedIndex = 0;
        }
Example #24
0
        private void CargarAgentesExistentes()
        {
            ComboBoxItemCollection coll = this.cboagente.Properties.Items;
            IList<Entidades.Paperless.PaperlessAgente> listAgentes = new List<Entidades.Paperless.PaperlessAgente>();

            listAgentes = LogicaNegocios.Paperless.Paperless.ObtenerAgentes(Entidades.Enums.Enums.Estado.Habilitado);

            coll = this.cboagente.Properties.Items;
            coll.Add(Utils.Utils.ObtenerPrimerItem());
            foreach (var list in listAgentes) {
                coll.Add(list);
            }
            this.cboagente.SelectedIndex = 0;
            this.cboagente.Properties.AutoComplete = true;
        }
Example #25
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);
            }
        }
Example #26
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);
        }
Example #27
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();
        }
Example #28
0
        private void gridView5_ShownEditor(object sender, EventArgs e)
        {
            if (this.gridView5.FocusedColumn.FieldName.Equals("Cliente.NombreFantasia"))
            {
                DevExpress.XtraEditors.TextEdit txt = (sender as DevExpress.XtraGrid.Views.Base.BaseView).ActiveEditor as DevExpress.XtraEditors.TextEdit;

                if (txt.MaskBox.AutoCompleteCustomSource.Count == 0)
                {
                    txt.MaskBox.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
                    txt.MaskBox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
                    txt.MaskBox.AutoCompleteCustomSource = GetClientes(txt);
                }
            }

            if (this.gridView5.FocusedColumn.FieldName.Equals("TipoCliente.Nombre"))
            {
                DevExpress.XtraEditors.ComboBoxEdit cbo = (sender as DevExpress.XtraGrid.Views.Base.BaseView).ActiveEditor as DevExpress.XtraEditors.ComboBoxEdit;
                ComboBoxItemCollection coll             = cbo.Properties.Items;

                foreach (var tipo in Paso1CargarClientes())
                {
                    coll.Add(tipo);
                }
            }
        }
Example #29
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;
        }
Example #30
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;
        }