Beispiel #1
0
        private void BB_Excluir_Click(object sender, EventArgs e)
        {
            using (TFFichaTec fFicha = new TFFichaTec())
            {
                fFicha.pCd_empresa     = (bsOrcamento.Current as TRegistro_Orcamento).Cd_empresa;
                fFicha.pCd_tabelapreco = (bsCFGEmpreendimento.Current as TRegistro_CadCFGEmpreendimento).Cd_tabelapreco;
                fFicha.vId_Orc         = (bsOrcamento.Current as TRegistro_Orcamento).Id_orcamentostr;
                fFicha.vNr_Ver         = (bsOrcamento.Current as TRegistro_Orcamento).Nr_versaostr;
                fFicha.vSt_Proj        = true;
                if (fFicha.ShowDialog() == DialogResult.OK)
                {
                    if (fFicha.rFicha != null)
                    {
                        fFicha.rFicha.St_addremessa  = "S";
                        fFicha.rFicha.Cd_empresa     = (bsOrcamento.Current as TRegistro_Orcamento).Cd_empresa;
                        fFicha.rFicha.Id_orcamento   = (bsOrcamento.Current as TRegistro_Orcamento).Id_orcamento;
                        fFicha.rFicha.Nr_versao      = (bsOrcamento.Current as TRegistro_Orcamento).Nr_versao;
                        fFicha.rFicha.Id_registrostr = fFicha.pId_registro;
                        fFicha.rFicha.Id_ficha       = null;
                        fFicha.rFicha.Id_orcamento   = (bsOrcamento.Current as TRegistro_Orcamento).Id_orcamento;

                        TCN_FichaTec.Gravar(fFicha.rFicha, null);
                        bsFicha.Add(fFicha.rFicha);
                    }
                }
            }
        }
Beispiel #2
0
 private void bb_inutilizar_Click(object sender, EventArgs e)
 {
     (bsMateriais.DataSource as IEnumerable <TRegistro_FichaTec>)
     .ToList()
     .FindAll(r => r.st_agregar)
     .ForEach(p =>
     {
         TCN_FichaTec.Gravar(p, null);
     });
     bsMateriais.ResetBindings(true);
     DialogResult = DialogResult.OK;
 }