예제 #1
0
 public DataSet GetAll(string empresaid, tb_claves BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbClaves_SEARCH", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@idcla", SqlDbType.VarChar, 40).Value = BE.idcla;
                 cmd.Parameters.Add("@clave", SqlDbType.VarChar, 10).Value = BE.clave;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
예제 #2
0
 public bool Delete(string empresaid, tb_claves BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbClaves_DELETE", cnx))
         {
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@idcla", SqlDbType.VarChar, 40).Value = BE.idcla;
             }
             try
             {
                 cnx.Open();
                 if (cmd.ExecuteNonQuery() > 0)
                 {
                     return true;
                 }
                 else
                 {
                     return false;
                 }
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
             finally
             {
                 cnx.Close();
             }
         }
     }
 }
예제 #3
0
 public bool Update(string empresaid, tb_claves BE)
 {
     return tablaDA.Update(empresaid, BE);
 }
예제 #4
0
 public bool Insert(string empresaid, tb_claves BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
예제 #5
0
 public DataSet GetAll(string empresaid, tb_claves BE)
 {
     return tablaDA.GetAll(empresaid, BE);
 }
예제 #6
0
 public bool Delete(string empresaid, tb_claves BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }