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.divavg.ws_yrreq_excal_ctrl { public partial class DsStatement : DataSourceRepeater { public DataSet1.DPDEPTADVANCEDWDataTable DATA { get; set; } public void InitStatement(PageWeb pw) { css1.Visible = false; css2.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.DPDEPTADVANCEDW; this.EventItemChanged = "OnDsStatementItemChanged"; this.EventClicked = "OnDsStatementClicked"; this.InitDataSource(pw, Repeater1, this.DATA, "dsStatement"); this.Register(); } public void RetrieveStatement(DateTime adtm_date, decimal an_dwflag,string coopid) { string sql = @" SELECT DPDEPTADVANCEDW.DW_DATE , DPDEPTADVANCEDW.DEPTACCOUNT_NO , DPDEPTADVANCEDW.COOP_ID , DPDEPTADVANCEDW.SEQ_NO , DPDEPTADVANCEDW.ENTRY_DATE , DPDEPTADVANCEDW.ENTRY_TIME , DPDEPTADVANCEDW.ENTRY_ID , DPDEPTADVANCEDW.DW_AMOUNT , DPDEPTADVANCEDW.DW_FLAG , DPDEPTADVANCEDW.POST_STATUS , DPDEPTADVANCEDW.MACHINE_ID , DPDEPTADVANCEDW.ITEM_STATUS , DPDEPTADVANCEDW.TOFROM_ACCID , DPDEPTMASTER.DEPTACCOUNT_NAME , 0 as flag FROM DPDEPTADVANCEDW , DPDEPTMASTER WHERE ( DPDEPTADVANCEDW.DEPTACCOUNT_NO = DPDEPTMASTER.DEPTACCOUNT_NO ) and ( DPDEPTADVANCEDW.COOP_ID = DPDEPTMASTER.COOP_ID ) and ( ( DPDEPTADVANCEDW.DW_DATE = {0} ) and ( DPDEPTADVANCEDW.COOP_ID = '" + coopid + @"' ) and ( DPDEPTADVANCEDW.DW_FLAG = 1 ) and ( DPDEPTADVANCEDW.ITEM_STATUS = 1 ) and ( DPDEPTADVANCEDW.POST_STATUS = 0 ) ) "; sql = WebUtil.SQLFormat(sql, adtm_date ); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); } public void DdDivitemtype() { string sql = @" select divitemtype_code, divitemtype_desc ,1 as sorter from yrucfdivitemtype union select '','',0 from dual order by sorter, divitemtype_code asc"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "divitemtype_code", "divitemtype_desc", "divitemtype_code"); } public void Ddtofrom_accid() { string sql = @" select account_id,account_id||' '||account_name as account_desc,1 as sorter from accmaster union select '','',0 from dual order by sorter, account_id asc"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "tofrom_accid", "account_desc", "account_id"); } } }