void btnSetPeriodoTrabajo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.gridView.SelectedRowsCount > 0) { String sPeriodo = _currentRow["Periodo"].ToString(); int IdEjercicio = (int)_currentRow["IdEjercicio"]; if (PeriodoContableDAC.SetPeriodoTrabajoActivo(IdEjercicio, sPeriodo)) { _dsPeriodo = PeriodoContableDAC.GetData((int)this.slkupEjercicio.EditValue, "*"); PopulateGrid(); } } }
private void slkupEjercicio_EditValueChanged(object sender, EventArgs e) { try { if (this.slkupEjercicio.EditValue != null && this.slkupEjercicio.EditValue.ToString() != "") { _dsPeriodo = PeriodoContableDAC.GetData((int)this.slkupEjercicio.EditValue, "*"); PopulateGrid(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BtnCerrarPeriodo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (this.gridView.SelectedRowsCount > 0) { String sPeriodo = _currentRow["Periodo"].ToString(); int IdEjercicio = (int)_currentRow["IdEjercicio"]; if (PeriodoContableDAC.CierraPeriodoContable(IdEjercicio, sPeriodo)) { _dsPeriodo = PeriodoContableDAC.GetData((int)this.slkupEjercicio.EditValue, "*"); PopulateGrid(); MessageBox.Show("El periodo contable se ha cerrado con éxito"); } } } catch (Exception) { } }