public static OnlineSkiPass[] GetUnusedOnlineSkiPass()
    {
        DataTable dt = DBHelper.GetDataTable(" select code from order_online left join card on card_no = code where   card.type = '雪票' and code <> '' and code is not null   and pay_state = 1 and used = 0  order by [id] desc ");

        OnlineSkiPass[] passArr = new OnlineSkiPass[dt.Rows.Count];
        for (int i = 0; i < passArr.Length; i++)
        {
            passArr[i] = new OnlineSkiPass(dt.Rows[i]["code"].ToString());
        }
        dt.Dispose();
        return(passArr);
    }
    public static OnlineSkiPass[] GetLastWeekOnlineSkiPass1()
    {
        DataTable dt = DBHelper.GetDataTable(" select code from order_online left join card on card_no = code where   card.type = '雪票' and code <> '' and code is not null   and pay_state = 1   and card.create_date >= '" + DateTime.Now.AddDays(-30).ToShortDateString() + "' order by [id] desc ");

        OnlineSkiPass[] passArr = new OnlineSkiPass[dt.Rows.Count];
        for (int i = 0; i < passArr.Length; i++)
        {
            passArr[i] = new OnlineSkiPass(dt.Rows[i]["code"].ToString());
        }
        dt.Dispose();
        return(passArr);
    }
    public static OnlineSkiPass[] GetOnlieSkiPassByOwnerOpenId(string openId)
    {
        DataTable dt = DBHelper.GetDataTable(" select * from order_online where type = '雪票' and code <> '' and code is not null and open_id = '"
                                             + openId.Trim() + "'  and pay_state = 1 "
                                             + " and exists ( select 'a' from [card] where card_no = order_online.code and [type]='雪票' ) order by [id] desc ");

        OnlineSkiPass[] passArr = new OnlineSkiPass[dt.Rows.Count];
        for (int i = 0; i < passArr.Length; i++)
        {
            passArr[i] = new OnlineSkiPass(dt.Rows[i]["code"].ToString());
        }
        dt.Dispose();
        return(passArr);
    }