public override int buscarRegistros() { TList_ProgCombustivel lista = TCN_ProgCombustivel.Buscar(cd_empresa.Text, cd_prod.Text, null); if (lista != null) { if (lista.Count > 0) { this.Lista = lista; bsProgCombustivel.DataSource = lista; } else if ((vTP_Modo == TTpModo.tm_Standby) || (vTP_Modo == TTpModo.tm_busca)) { bsProgCombustivel.Clear(); } return(lista.Count); } else { return(0); } }
public override string gravarRegistro() { if (pc_desconto.Focused) { (bsProgCombustivel.Current as TRegistro_ProgCombustivel).Pc_desconto = pc_desconto.Value; } return(TCN_ProgCombustivel.Gravar((bsProgCombustivel.Current as TRegistro_ProgCombustivel), null)); }
public override void excluirRegistro() { if (bsProgCombustivel.Current != null) { if ((this.vTP_Modo == TTpModo.tm_Standby) || (this.vTP_Modo == TTpModo.tm_busca)) { if (MessageBox.Show("Confirma Exclusão do Registro?", "Mensagem", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) { TCN_ProgCombustivel.Excluir(bsProgCombustivel.Current as TRegistro_ProgCombustivel, null); bsProgCombustivel.RemoveCurrent(); pDados.LimparRegistro(); } } } }