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_npl_mavpayout_ctrl { public partial class DsMain : DataSourceFormView { public DataSet1.LNNPLMAVPAYOUTDataTable DATA { get; set; } public void InitDsMain(PageWeb pw) { css1.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.LNNPLMAVPAYOUT; this.InitDataSource(pw, FormView1, this.DATA, "dsMain"); this.EventItemChanged = "OnDsMainItemChanged"; this.EventClicked = "OnDsMainClicked"; this.Button.Add("b_membsearch"); this.Button.Add("b_cancel"); this.Register(); } public void Retrieve() { string sql = @"select mbucfprename.prename_desc , mbmembmaster.memb_name , mbmembmaster.memb_surname , lnnplmavpayout.coop_id , lnnplmavpayout.mavpay_docno , lnnplmavpayout.sue_no , lnnplmavpayout.memcoop_id , mbmembmaster.member_no , lnnplmavpayout.mavpay_date , lnnplmavpayout.mavpay_amt, lnnplmavpayout.mavpay_status, lnnplmavpayout.bfmavbal_amt, lnnplmavpayout.entry_id, lnnplmavpayout.entry_date, lnnplmavpayout.entry_bycoopid from lnnplmavpayout , mbmembmaster , mbucfprename where ( lnnplmavpayout.memcoop_id = mbmembmaster.coop_id ) and ( lnnplmavpayout.member_no = mbmembmaster.member_no ) and ( mbucfprename.prename_code = mbmembmaster.prename_code ) and ( lnnplmavpayout.mavpay_docno = {1} and lnnplmavpayout.coop_id = {0})"; sql = WebUtil.SQLFormat(sql, state.SsCoopControl,this.DATA[0].MAVPAY_DOCNO); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); Ddsueno(); } public void Ddsueno() { string sql = @"select sue_no , 1 as sorter from lnnplsue where member_no = {1} and memcoop_id = {0} union select '',0 from dual order by sorter, sue_no"; sql = WebUtil.SQLFormat(sql, state.SsCoopControl, WebUtil.MemberNoFormat(this.DATA[0].MEMBER_NO)); DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "sue_no", "sue_no", "sue_no"); } } }