Mono.Moma.MySqlDataAccess.InsertReportMaster C# (CSharp) Method

InsertReportMaster() public method

public InsertReportMaster ( System.DateTime submit_date, string ip, string definitions, string reported_by, string email, string organization, string homepage, string comment, string guid ) : int
submit_date System.DateTime
ip string
definitions string
reported_by string
email string
organization string
homepage string
comment string
guid string
return int
        public override int InsertReportMaster(DateTime submit_date, string ip, string definitions,
							string reported_by, string email, string organization,
							string homepage, string comment, string guid)
        {
            IDbConnection cnc = GetConnection ();
            try {
                IDbCommand cmd = cnc.CreateCommand ();
                cmd.Transaction = transaction;
                cmd.CommandText = "insert_report_master";
                cmd.CommandType = CommandType.StoredProcedure;
                AddParameter (cmd, "submit_date", submit_date);
                AddParameter (cmd, "ip", ip);
                AddParameter (cmd, "definitions", definitions);
                AddParameter (cmd, "reported_by", reported_by);
                AddParameter (cmd, "email", email);
                AddParameter (cmd, "organization", organization);
                AddParameter (cmd, "homepage", homepage);
                AddParameter (cmd, "comment", comment);
                AddParameter (cmd, "guid", guid);
                IDataParameter p = AddOutputParameter (cmd, "id");
                if (cmd.ExecuteNonQuery () != 1)
                    throw new ApplicationException ("Error inserting new report (master)");
                return Convert.ToInt32 (p.Value);
            } finally {
                if (transaction == null)
                    cnc.Close ();
            }
        }