private void BS_Cad_CondPGTO_PositionChanged(object sender, EventArgs e) { if (BS_Cad_CondPGTO.Current != null) { if (!string.IsNullOrEmpty((BS_Cad_CondPGTO.Current as TRegistro_CadCondPgto).Cd_condpgto)) { (BS_Cad_CondPGTO.Current as TRegistro_CadCondPgto).lCondPgto_X_Parcelas = TCN_CadCondPgto_X_Parcelas.Buscar((BS_Cad_CondPGTO.Current as TRegistro_CadCondPgto).Cd_condpgto, null); BS_Cad_CondPGTO.ResetCurrentItem(); } } }
public void InserirParcelas() { if (vTP_Modo.Equals(TTpModo.tm_Insert) || vTP_Modo.Equals(TTpModo.tm_Edit)) { if (BS_Cad_CondPGTO.Current != null) { if ((BS_Cad_CondPGTO.Current as TRegistro_CadCondPgto).Qt_parcelas > 1) { using (TFCadCondPGTO_X_Parcelas fCondParcelas = new TFCadCondPGTO_X_Parcelas()) { fCondParcelas.rCondpgto = BS_Cad_CondPGTO.Current as CamadaDados.Financeiro.Cadastros.TRegistro_CadCondPgto; fCondParcelas.ShowDialog(); BS_Cad_CondPGTO.ResetCurrentItem(); } } else { MessageBox.Show("Permitido gerar parcelas somente de condição de pagamento com mais de uma parcela.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }