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_ad_usertogroup_ctrl { public partial class Appshow : DataSourceRepeater { public DataSet1.amappstatusDataTable DATA { get; set; } public void InitDsAppshow(PageWeb pw) { //กำลังพัฒนาาาาาาาาาาาาาาาาาาาาา DataSet1 ds = new DataSet1(); this.DATA = ds.amappstatus; this.EventItemChanged = "OnDsAppshowItemChanged"; this.EventClicked = "OnDsAppshowClicked"; this.InitDataSource(pw, RepeaterAppshow, this.DATA, "dsAppshow"); this.Register(); } public void RetrieveAppshow(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); } } }