예제 #1
0
        public void callUpdate(call call)
        {
            createConnection();
            connection.Open();
            SqlCommand command = new SqlCommand("callUpdate", connection);
            command.CommandType = CommandType.StoredProcedure;

            command.Parameters.Add("@code", SqlDbType.Int, 50);
            command.Parameters["@code"].Value = call.code;
            command.Parameters.Add("@phoneNumber", SqlDbType.Int, 50);
            command.Parameters["@phoneNumber"].Value = call.phoneNumber;
            command.Parameters.Add("@dateTime", SqlDbType.DateTime, 50);
            command.Parameters["@dateTime"].Value = call.dateTime;
            command.Parameters.Add("@duration", SqlDbType.Int, 50);
            command.Parameters["@duration"].Value = call.duration;
            command.Parameters.Add("@personID", SqlDbType.Int, 50);
            command.Parameters["@personID"].Value = call.personID;
            command.Parameters.Add("@inout", SqlDbType.NChar, 10);
            command.Parameters["@inout"].Value = call.inout;

            command.ExecuteNonQuery();

            connection.Close();
            connection.Dispose();
        }
예제 #2
0
        public void callUpdate(call call)
        {
            createConnection();
            connection.Open();
            SqlCommand command = new SqlCommand("callUpdate", connection);

            command.CommandType = CommandType.StoredProcedure;


            command.Parameters.Add("@code", SqlDbType.Int, 50);
            command.Parameters["@code"].Value = call.code;
            command.Parameters.Add("@phoneNumber", SqlDbType.Int, 50);
            command.Parameters["@phoneNumber"].Value = call.phoneNumber;
            command.Parameters.Add("@dateTime", SqlDbType.DateTime, 50);
            command.Parameters["@dateTime"].Value = call.dateTime;
            command.Parameters.Add("@duration", SqlDbType.Int, 50);
            command.Parameters["@duration"].Value = call.duration;
            command.Parameters.Add("@personID", SqlDbType.Int, 50);
            command.Parameters["@personID"].Value = call.personID;
            command.Parameters.Add("@inout", SqlDbType.NChar, 10);
            command.Parameters["@inout"].Value = call.inout;


            command.ExecuteNonQuery();

            connection.Close();
            connection.Dispose();
        }