コード例 #1
0
 public void Delete()
 {
     try
     {
         using (ClientePL pl = new ClientePL())
         {
             pl.SP_DELETAR_CLIENTE(this.Instance.Codigo);
         };
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
ファイル: Regras.Cliente.cs プロジェクト: gustt/JeitoCaipira
 public int Insert()
 {
     ClientePL pl = null;
     try
     {
         pl = new ClientePL();
         return pl.SP_SALVAR_CLIENTE(this.Instance);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             GC.SuppressFinalize(pl);
     }
 }
コード例 #3
0
 public List<DAL.Entidades.Cliente> List(string NomeFantasia, string RazaoSocial)
 {
     ClientePL pl = null;
     List<DAL.Entidades.Cliente> retorno = new List<DAL.Entidades.Cliente>();
     try
     {
         pl = new ClientePL();
         retorno =
             pl.SP_CONSULTAR_CLIENTE(NomeFantasia, RazaoSocial);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             pl.Dispose();
     }
     return retorno;
 }
コード例 #4
0
 public void Select(int Codigo)
 {
     ClientePL pl = null;
     try
     {
         pl = new ClientePL();
         this.Instance = pl.SP_SELECIONAR_CLIENTE(Codigo);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }