private void dgvList_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
        {
            if (e.StateChanged != DataGridViewElementStates.Selected)
            {
                return;
            }

            if (dgvList.SelectedRows.Count != 0)
            {
                try
                {
                    DataGridViewRow row = this.dgvList.SelectedRows[0];
                    one = (InvOperacion)row.DataBoundItem;
                }
                catch (Exception ex)
                {
                    //MessageBox.Show(ex.Message);
                    MetroFramework.MetroMessageBox.Show(this.MdiParent, ex.Message, "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                btnEdit.Visible = true;
            }
            else
            {
                btnEdit.Visible = false;
            }
        }
Example #2
0
        public frmInvOperacionesDetail(InvOperacion _one)
        {
            InitializeComponent();
            //ONE
            if (_one == null)
            {
                return;
            }
            one = _one;
            CrearBindings();
            _tipoOperacion = srvOperacion.GetOne(one.id_tipo_operacion);
            if (_tipoOperacion == null)
            {
                return;
            }
            lblTitle.Text    = _tipoOperacion.nombre;
            lblSubTitle.Text = one.nro_control;

            //DETALLE
            _listaDetalle = srvMovimiento.GetList(one.id);
            bList         = new BindingList <InvMovimientoService.InvMovimiento>(_listaDetalle);

            bs.DataSource      = bList;
            dgvList.DataSource = bs;
            Totalizar();
            ValidarBotones();
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            InvOperacion _one = new InvOperacion();

            _one = srv.GetOne(Globals.logEmpresa.id, cmbTipoOperacion.SelectedValue.ToString(), "0");

            Form f = new frmInvOperacionesDetail(_one);

            ConfigUI.LaunchChildForm(f, Globals.appParentWindow);
        }
Example #4
0
        public string SetOne(InvOperacion one, List <InvMovimiento> detail)
        {
            string _id = srv.SetOne(one, detail);

            return(_id);
        }
Example #5
0
        public InvOperacion GetOne(string idEmpresa, string idTipo, string id)
        {
            InvOperacion _one = srv.GetOne(idEmpresa, idTipo, id);

            return(_one);
        }