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.CriteriaIReport.Age_of_receivables { public partial class DsMain : DataSourceFormView { public DataSet1.DataTable2DataTable DATA { get; set; } public void InitDsMain(PageWeb pw) { css1.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.DataTable2; this.EventItemChanged = "OnDsMainItemChanged"; this.EventClicked = "OnDsMainClicked"; this.InitDataSource(pw, FormView1, this.DATA, "dsMain"); this.Register(); } public void DdCoopId() { String sql = @" SELECT COOP_ID, COOP_NAME FROM CMCOOPMASTER "; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "coop_id", "coop_name", "coop_id"); } // public void DdLoanTypeS() // { // String sql = @"select '00' as loantype_code,'กรุณาเลือก' as display,'กรุณาเลือก' as loantype_desc,'0' as countcontgrt_code from lnloantype union //SELECT loantype_code, // CONCAT(CONCAT(loantype_code,'-'),loantype_desc) as display, // loantype_desc ,countcontgrt_code // from lnloantype order by countcontgrt_code asc"; // sql = WebUtil.SQLFormat(sql); // DataTable dt = WebUtil.Query(sql); // this.DropDownDataBind(dt, "start_loantype", "display", "loantype_code"); // } // public void DdLoanTypeE() // { // String sql = @"select '00' as loantype_code,'กรุณาเลือก' as display,'กรุณาเลือก' as loantype_desc,'0' as countcontgrt_code from lnloantype union //SELECT loantype_code, // CONCAT(CONCAT(loantype_code,'-'),loantype_desc) as display, // loantype_desc ,countcontgrt_code // from lnloantype order by countcontgrt_code asc"; // sql = WebUtil.SQLFormat(sql); // DataTable dt = WebUtil.Query(sql); // this.DropDownDataBind(dt, "end_loantype", "display", "loantype_code"); // } public void DdMembgroup() { string sql = @"SELECT a.* FROM( select membgroup_code, CONCAT(CONCAT(membgroup_code,' '),membgroup_desc) as display,1 as sorter from mbucfmembgroup union select ''as membgroup_code,''as display,0 as sorter from dual)a order by a.sorter,a.membgroup_code" ; sql = WebUtil.SQLFormat(sql); this.DropDownDataBind(sql, "memgroup_start", "display", "membgroup_code"); this.DropDownDataBind(sql, "memgroup_End", "display", "membgroup_code"); } } }