CSHARP 4
AddExtionToGroup Guest on 14th July 2025 05:51:36 AM
  1. public async Task AddExtionToGroup(string gId, string eId)
  2. {
  3.     try
  4.     {
  5.         using (SqlConnection con = new SqlConnection(connectionString))
  6.         {
  7.             SqlCommand cmd = new SqlCommand("spinsertextensions", con);
  8.             cmd.CommandType = CommandType.StoredProcedure;
  9.  
  10.  
  11.             cmd.Parameters.Add(new SqlParameter("@ExtensionId", eId));
  12.             cmd.Parameters.Add(new SqlParameter("@GroupID", gId ?? (object)DBNull.Value));
  13.  
  14.  
  15.             con.Open();
  16.             await cmd.ExecuteReaderAsync();
  17.             con.Close();
  18.  
  19.  
  20.  
  21.  
  22.  
  23.         }
  24.     }
  25.  
  26.     catch (Exception ex)
  27.     {
  28.  
  29.         throw;
  30.     }
  31.  
  32. }

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.