using System; using CoreSavingLibrary; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; namespace Saving.Applications.admin.w_sheet_grouppermiss_ctrl { public partial class DsApp : DataSourceRepeater { public DataSet1.amsecuseappsDataTable DATA { get; set; } public void InitDsApp(PageWeb pw) { DataSet1 ds = new DataSet1(); //this.Button.Add("b_3"); this.DATA = ds.amsecuseapps; this.EventItemChanged = "OnDsAppItemChanged"; this.EventClicked = "OnDsAppClicked"; this.InitDataSource(pw, Repeater1, this.DATA, "dsApp"); this.Button.Add("b_4"); this.Button.Add("b_3"); this.Register(); } public void RetrieveApp(string user_name) { string sql = @" select amsecuseapps.coop_id, amsecuseapps.user_name, amsecuseapps.application, amappstatus.description from amappstatus,amsecuseapps where amappstatus.application = amsecuseapps.application and amappstatus.coop_id = amsecuseapps.coop_id and amsecuseapps.coop_id = {0} and amsecuseapps.user_name = {1}"; sql = WebUtil.SQLFormat(sql,state.SsCoopId,user_name); DataTable dt = WebUtil.Query(sql); //ทำยังไงก็ได้ให้ได้ DataTable หรือ Xml String ที่มีข้อมูล แล้วนำมาใช้คำสั่ง ImportData this.ImportData(dt); } } }