示例#1
0
        public void Save()
        {
            try
            {
                if (string.IsNullOrEmpty(txtALF_SUCU.Text))
                    throw new ArgumentException("Ingresar el nombre de la sucursal");

                var oBe = new BESVMC_SUCU();
                var oBr = new BRSVMC_SUCU();

                if (string.IsNullOrEmpty(txtCOD_SUCU.Text))
                {
                    oBe.NUM_ACCI = 1;
                }
                else
                {
                    oBe.NUM_ACCI = 2;
                    oBe.COD_SUCU = Convert.ToInt32(txtCOD_SUCU.Text);
                }

                oBe.ALF_SUCU = txtALF_SUCU.Text;
                oBe.ALF_DESC = meALF_DESC.Text;
                oBe.COD_USUA_CREA = SESSION_USER;
                oBe.COD_USUA_MODI = SESSION_USER;
                oBe.COD_COMP = SESSION_COMP;

                oBr.Set_SVPR_SUCU(oBe);
                txtCOD_SUCU.Text = oBe.COD_SUCU.ToString();
                var oBeC = new BESVMC_SUCU();
                var oBrC = new BRSVMC_SUCU();

                oBeC.NUM_ACCI = 4;
                oBeC.COD_COMP = SESSION_COMP;

                var oListC = oBrC.Get_SVPR_SUCU_LIST(oBeC);
                gdcBranch.DataSource = oListC;
                StateControl(true);
                XtraMessageBox.Show("Operación realizada con exito!!!", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        private void xfBranch_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            StateControl(true);
            var oBeC = new BESVMC_SUCU();
            var oBrC = new BRSVMC_SUCU();

            oBeC.NUM_ACCI = 4;
            oBeC.COD_COMP = SESSION_COMP;

            var oListC = oBrC.Get_SVPR_SUCU_LIST(oBeC);
            gdcBranch.DataSource = oListC;
        }