Exemple #1
0
        private void xfProfiles_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            ControlState(true);

            var oBe = new BESVMC_PERF();
            var oBr = new BRSVMC_PERF();

            var oBeMm = new BESVMC_MAIN_MENU();
            var oBrMm = new BRSVMC_MAIN();

            oBe.NUM_ACCI = 4;
            oBe.COD_COMP = SESSION_COMP;
            var oList = oBr.Get_SVPR_PERF_LIST(oBe);
            gdcProfile.DataSource = oList;

            oBeMm.NUM_ACCI = 4;
            var oListMm = oBrMm.Get_SVPR_MAIN_LIST(oBeMm);
            gdcMain.DataSource = oListMm;
        }
Exemple #2
0
        public void Save()
        {
            try
            {
                gdvOptions.CloseEditor();
                gdvOptions.RefreshData();

                gdvButtons.CloseEditor();
                gdvButtons.RefreshData();

                var oBe = new BESVMC_PERF();
                var oBr = new BRSVMC_PERF();

                if (string.IsNullOrEmpty(txtCOD_PERF.Text))
                {
                    oBe.NUM_ACCI = 1;
                }
                else
                {
                    oBe.NUM_ACCI = 2;
                    oBe.COD_PERF = int.Parse(txtCOD_PERF.Text);
                }

                oBe.ALF_PERF = txtALF_PERF.Text;
                oBe.ALF_DESC = meALF_DESC.Text;

                oBe.OBJ_ACCE.LST_OPCI = oListOpci;
                oBe.OBJ_ACCE.LST_OPCI_BUTT = oListButt;

                oBe.COD_COMP = SESSION_COMP;
                oBe.COD_USUA_CREA = SESSION_USER;
                oBe.COD_USUA_MODI = SESSION_USER;

                if (XtraMessageBox.Show("Esta seguro de que desea guardar los datos del perfil?", "Sistema", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    oBr.Set_SVPR_PERF(oBe);

                    txtCOD_PERF.Text = oBe.COD_PERF.ToString();

                    var oBeOpci = new BESVMC_OPCI();
                    var oBrOpci = new BRSVMC_OPCI();

                    var oBeButt = new BESVMC_BUTT();
                    var oBrButt = new BRSVMC_BUTT();

                    oBeOpci.NUM_ACCI = 4;
                    oBeOpci.COD_PERF = oBe.COD_PERF;

                    oListOpci = oBrOpci.Get_SVPR_OPCI_LIST(oBeOpci);
                    gdcOptions.DataSource = oListOpci;
                    gdvOptions.ActiveFilter.Add(gdvOptions.Columns["COD_MAIN"],
                        new ColumnFilterInfo(String.Format("[COD_MAIN] = {0} ", 0), ""));

                    oBeButt.NUM_ACCI = 4;
                    oBeButt.COD_PERF = oBe.COD_PERF;

                    oListButt = oBrButt.Get_SVPR_BUTT_LIST(oBeButt);
                    gdcButtons.DataSource = oListButt;
                    gdvButtons.ActiveFilter.Add(gdvButtons.Columns["COD_OPCI"],
                        new ColumnFilterInfo(String.Format("[COD_OPCI] = {0}", 0), ""));

                    var oBeProf = new BESVMC_PERF();
                    var oBrProf = new BRSVMC_PERF();

                    oBeProf.NUM_ACCI = 4;
                    oBeProf.COD_COMP = SESSION_COMP;
                    var oList = oBrProf.Get_SVPR_PERF_LIST(oBeProf);
                    gdcProfile.DataSource = oList;
                    ControlState(true);
                    XtraMessageBox.Show("Operacion realizada con exito", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,"Sistema",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
Exemple #3
0
        public void Undo()
        {
            ClearControls();
            var oBeProf = new BESVMC_PERF();
            var oBrProf = new BRSVMC_PERF();

            oBeProf.NUM_ACCI = 4;
            oBeProf.COD_COMP = SESSION_COMP;
            var oList = oBrProf.Get_SVPR_PERF_LIST(oBeProf);
            gdcProfile.DataSource = oList;
            ControlState(true);
        }
Exemple #4
0
        private void xfUsuario_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            var oBe = new BESVMC_PERF();
            var oBr = new BRSVMC_PERF();

            oBe.NUM_ACCI = 4;
            oBe.COD_COMP = SESSION_COMP;
            var oList = oBr.Get_SVPR_PERF_LIST(oBe);

            lueCOD_PERF.Properties.DataSource = oList;
            lueCOD_PERF.Properties.Columns.Clear();
            lueCOD_PERF.Properties.Columns.Add(new LookUpColumnInfo("ALF_PERF", 100, "Perfiles"));
            lueCOD_PERF.Properties.DisplayMember = "ALF_PERF";
            lueCOD_PERF.Properties.ValueMember = "COD_PERF";

            var oBeU = new BESVMC_USUA();
            var oBrU = new BRSVMC_USUA();

            oBeU.COD_COMP = SESSION_COMP;
            oBeU.NUM_ACCI = 4;

            var oListUser = oBrU.Get_SVPR_USUA_LIST(oBeU);

            gdcUsuarios.DataSource = oListUser;

            StateControl(true);
        }