Files
17168ERP/web/admin/activity/index.aspx.cs
2025-08-29 01:27:25 +08:00

70 lines
1.4 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.IO;
using System.Linq;
using static TreeView;
public partial class admin_activity_index : MyWeb.config
{
private Model.ezEntities _db = new Model.ezEntities();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BuildKind();
}
}
#region
public void BuildKind()
{
s_kind.Items.Clear();
s_kind.Items.Add(new ListItem("", ""));
//buildMultiKind(s_kind, "activity_kind", 0, "", 1, Model.activity.KindLevelMax);
var qry1 = new TreeView().get_data2(_db.activity_kind.Select(o => new TreeItem()
{
kind = o.kind,
num = o.num,
root = o.root,
range = o.range,
}).OrderBy(x => x.root).ThenBy(x => x.kind).ToList(), 0, 0);
if (qry1.Count() > 0)
foreach (var qq in qry1)
s_kind.Items.Add(new ListItem(new TreeView().RptDash(qq.Level) + qq.kind, qq.num.ToString()));
}
#endregion
#region Excel
protected void excel_Click(object sender, EventArgs e)
{
//請參考訂單系統的匯出
}
#endregion
}