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.shrlon.ws_sl_printdept_ctrl { public partial class DsList : DataSourceRepeater { public DataSet1.DPDEPTMASTERDataTable DATA { get; set; } public void InitDsList(PageWeb pw) { css1.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.DPDEPTMASTER; this.EventItemChanged = "OnDsListItemChanged"; this.EventClicked = "OnDsListClicked"; this.InitDataSource(pw, Repeater1, this.DATA, "dsList"); this.Register(); } public void RetrieveList(string sgroup, string egroup, DateTime sdate, DateTime edate, string member_no, string loantype, string type) { string hj = ""; if (type == "01") { hj = " and dpdeptstatement.deptitemtype_code = 'INT' "; sdate = state.SsWorkDate.AddMonths(-3); } String sql = @"select dpdeptmaster.coop_id, dpdeptmaster.depttype_code, dpdeptmaster.deptaccount_no, dpdeptmaster.member_no, dpdeptmaster.prncbal, dpdeptmaster.deptopen_date, dpdeptmaster.deptaccount_name, mbmembmaster.membgroup_code from dpdeptmaster, dpdeptstatement, mbmembmaster where ( mbmembmaster.member_no = dpdeptmaster.member_no ) and ( mbmembmaster.coop_id = dpdeptmaster.coop_id ) and ( dpdeptmaster.coop_id = {0} ) and ( dpdeptmaster.member_no like {5} ) and ( dpdeptmaster.deptaccount_no = dpdeptstatement.deptaccount_no ) and ( dpdeptstatement.operate_date between {3} and {4} ) and ( mbmembmaster.membgroup_code between {1} and {2} ) and ( dpdeptmaster.depttype_code like {6} ) " + hj + @" group by dpdeptmaster.coop_id, dpdeptmaster.depttype_code, dpdeptmaster.deptaccount_no, dpdeptmaster.member_no, dpdeptmaster.prncbal, dpdeptmaster.deptopen_date, dpdeptmaster.deptaccount_name, mbmembmaster.membgroup_code order by dpdeptmaster.deptaccount_no asc "; sql = WebUtil.SQLFormat(sql, state.SsCoopId, sgroup, egroup, sdate, edate, member_no, loantype); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); } } //} and ( lnloantype.loangroup_code like {1} ) }