Beispiel #1
0
 private bool ExecutaPosvalidaCad(CliforDAO objCliente, bool bIncluindo)
 {
     bool bRetorno = objCliente.ProcessarPosvalidaCad();
     string sCdClifor = objCliente.GetValorPrimario("CD_CLIFOR");
     if (bRetorno)
     {
         if (!bIncluindo)
         {
             MessageHLP.ShowPopUpMsg(string.Format("Dados do Cliente {0}, foram alterados com sucesso! {1}Código: {2}", txtNmGuerra.GetValor(), Environment.NewLine, sCdClifor), this.Page);
         }
         else
         {
             MessageHLP.ShowPopUpMsg(string.Format("Cliente {0} salvo com sucesso! {1}Código: {2}", txtNmGuerra.GetValor(), Environment.NewLine, sCdClifor), this.Page);
         }
         objCliente.ClearComponentes(this);
         Response.Redirect("~/PesquisarClientes.aspx?CD_CLIFOR=" + sCdClifor.ToString());
     }
     else
     {
         MessageHLP.ShowPopUpMsg(objCliente.GetErros(), this.Page);
     }
     return bRetorno;
 }
Beispiel #2
0
    private bool ExecutaPosvalidaCad(CliforDAO objCliente, bool bIncluindo)
    {
        bool bRetorno = objCliente.ProcessarPosvalidaCad();
        string sCdClifor = objCliente.GetValorPrimario("CD_CLIFOR");
        if (bRetorno)
        {
            if (!bIncluindo)
            {
                if (lblCdClifor.Text != "")
                {
                    Session["CD_ALTER"] = lblCdClifor.Text;
                }
                MessageHLP.ShowPopUpMsg(string.Format("Dados do Cliente {0}, foram alterados com sucesso! {1}Código: {2}", txtNmGuerra.GetValor(), Environment.NewLine, Session["CD_ALTER"].ToString()), this.Page);
            }
            else
            {
                UsuarioWeb objUsuario = (UsuarioWeb)Session["ObjetoUsuario"];
                Session["CD_ALTER"] = objUsuario.oTabelas.hlpDbFuncoes.qrySeekValue("CLIFOR", "FIRST 1 CD_CLIFOR", string.Format("nm_clifor = '{0}' AND nm_guerra = '{1}'", this.txtNmClifor.GetValor(), this.txtNmGuerra.GetValor()));

                MessageHLP.ShowPopUpMsg(string.Format("Cliente {0} salvo com sucesso! {1}Código: {2}", txtNmGuerra.GetValor(), Environment.NewLine, Session["CD_ALTER"].ToString()), this.Page);
            }
            objCliente.ClearComponentes(this);
            Response.Redirect("~/PesquisarClientes.aspx?CD_ALTER=" + Session["CD_ALTER"].ToString());
        }
        else
        {
            MessageHLP.ShowPopUpMsg(objCliente.GetErros(), this.Page);
        }
        return bRetorno;
    }