- using System;
- using System.Data;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data.SqlClient;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DeviceMonitor.DBContext
- {
- internal class ResponcedbContex
- {
- public readonly string connectionString = ConfigurationManager.ConnectionStrings["connectionStr"].ConnectionString;
- public void InsertResponce(string MyResponce, string MyError, string RCode, string MyRequest)
- {
- try
- {
- {
- cmd.CommandType = CommandType.StoredProcedure;
- {
- ParameterName = "@MyResponce",
- Value = Convert.ToString(MyResponce)
- };
- cmd.Parameters.Add(parametrResponce);
- {
- ParameterName = "@MyError",
- Value = Convert.ToString(MyError)
- };
- cmd.Parameters.Add(parametrError);
- {
- ParameterName = "@RCode",
- Value = Convert.ToString(RCode)
- };
- cmd.Parameters.Add(parametrRCode);
- {
- ParameterName = "@Request",
- Value = Convert.ToString(MyRequest)
- };
- cmd.Parameters.Add(parametrMyRequest);
- con.Open();
- cmd.ExecuteReader();
- con.Close();
- }
- }
- catch (Exception ex)
- {
- string msg = ex.Message;
- }
- }
- }
- }
Recent Pastes