using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CoreSavingLibrary; using System.Data; namespace Saving.Applications.shrlon.ws_sl_intcert_list_ctrl { public partial class DsDetail : DataSourceFormView { public DataSet1.LNCONTINTCERTDETDataTable DATA { get; private set; } public void InitDsDetail(PageWeb pw) { css1.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.LNCONTINTCERTDET; this.EventItemChanged = "OnDsDetailItemChanged"; this.EventClicked = "OnDsDetailClicked"; this.InitDataSource(pw, FormView1, this.DATA, "dsDetail"); this.Button.Add("b_getaddr"); this.Register(); } public void RetrieveDetail(string loancontract_no) { string sql = @"select coop_id, loancontract_no, objmainbuy_flag, objmainrent_flag, objmainbuild_flag, objmainrepay_flag, objsubbuy_code, objsubrent_code, objsubbuild_code, objsubrepay_code, intcertobj_overamt, intaddr_no, intaddr_soi, intaddr_road, intaddr_tambol, intaddr_amphur, intaddr_province from lncontintcertdet where ( coop_id = {0} ) and ( loancontract_no = {1} )"; sql = WebUtil.SQLFormat(sql, state.SsCoopControl, loancontract_no); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); } } }