private void btnGrava_Click(object sender, EventArgs e)
 {
     if (rbtSeparar.Checked == true)
     {
         DALConexao  cx     = new DALConexao(DadosDaConexao.StringDeConexao);
         BLLVenda    bll    = new BLLVenda(cx);
         ModeloVenda modelo = bll.CarregaModeloFatura(Convert.ToInt32(txtCodVenda.Text));
         modelo.CodEquipe   = Convert.ToInt32(txtCodEquipe.Text);
         modelo.NomeEquipe  = txtNomeEquipe.Text;
         modelo.DataIni     = DateTime.Now;
         modelo.VenCod      = Convert.ToInt32(txtCodVenda.Text);
         modelo.ValorSepara = Convert.ToDouble(txtValor.Text);
         bll.AlterarS(modelo);
         btnCancel_Click(sender, e);
         this.AtualizaCabecalhoDGCompra();
         txtCodVenda.Text = null;
     }
     if (rbtSeparados.Checked == true && ckbDivide.Checked == false)
     {
         DALConexao  cx     = new DALConexao(DadosDaConexao.StringDeConexao);
         BLLVenda    bll    = new BLLVenda(cx);
         ModeloVenda modelo = bll.CarregaModeloFatura(Convert.ToInt32(txtCodVenda.Text));
         modelo.DataFim = DateTime.Now;
         bll.AlterarSf(modelo);
         btnCancel_Click(sender, e);
         this.AtualizaCabecalhoDGSeparados();
         txtCodVenda.Text = null;
     }
 }