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

InsertOrUpdateMember() public method

public InsertOrUpdateMember ( int report_id, string name, bool is_missing, bool is_todo, bool is_niex, string todo_comment ) : bool
report_id int
name string
is_missing bool
is_todo bool
is_niex bool
todo_comment string
return bool
        public override bool InsertOrUpdateMember(int report_id, string name, bool is_missing, bool is_todo, bool is_niex, string todo_comment)
        {
            IDbConnection cnc = GetConnection ();
            try {
                IDbCommand cmd = cnc.CreateCommand ();
                cmd.Transaction = transaction;
                cmd.CommandText = "insert_or_update_member";
                cmd.CommandType = CommandType.StoredProcedure;
                AddParameter (cmd, "report_id", report_id);
                AddParameter (cmd, "name", name);
                AddParameter (cmd, "is_missing", is_missing);
                AddParameter (cmd, "is_todo", is_todo);
                AddParameter (cmd, "is_niex", is_niex);
                AddParameter (cmd, "todo_comment", todo_comment);
                int r = cmd.ExecuteNonQuery ();
                return (r == 2) ? false : true;
            } finally {
                if (transaction == null)
                    cnc.Close ();
            }
        }