Beispiel #1
0
        public static int Execute(string command, byte[] image)
        {
            SqlCommand cmd = new SqlCommand(command, DBConnection.connect());

            cmd.Parameters.Add(new SqlParameter("@imagedata", (object)image));

            return(cmd.ExecuteNonQuery());
        }
Beispiel #2
0
        public static int Execute(string command, byte[] signature1, byte[] signature2)
        {
            SqlCommand cmd = new SqlCommand(command, DBConnection.connect());

            cmd.Parameters.Add(new SqlParameter("@signature1", (object)signature1));
            cmd.Parameters.Add(new SqlParameter("@signature2", (object)signature2));

            return(cmd.ExecuteNonQuery());
        }
Beispiel #3
0
        public static int Execute(string command, byte[] MemberSig, byte[] GuardianSig, byte[] IssuerSig)
        {
            SqlCommand cmd = new SqlCommand(command, DBConnection.connect());

            cmd.Parameters.Add(new SqlParameter("@MemberSig", (object)MemberSig));
            cmd.Parameters.Add(new SqlParameter("@GuardianSig", (object)GuardianSig));
            cmd.Parameters.Add(new SqlParameter("@IssuerSig", (object)IssuerSig));

            return(cmd.ExecuteNonQuery());
        }
Beispiel #4
0
        public static DataTable GetRecordSet(string query)
        {
            SqlDataAdapter adapter = new SqlDataAdapter(query, DBConnection.connect());
            DataTable      table   = new DataTable();

            adapter.Fill(table);
            //DBConnection.connect().Close();
            return(table);
            // DBConnection.connect().Dispose();
            //DBConnection.connect().Close();
        }
Beispiel #5
0
        public static int Execute(string command)
        {
            SqlCommand cmd = new SqlCommand(command, DBConnection.connect());

            return(cmd.ExecuteNonQuery());
        }