using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CoreSavingLibrary; using CoreSavingLibrary.WcfNShrlon; namespace Saving.Applications.shrlon.ws_sl_payoutslip_ctrl { public partial class ws_sl_payoutslip : PageWebSheet, WebSheet { [JsPostBack] public string PostMain { get; set; } public void InitJsPostBack() { dsMain.InitDsMain(this); dsList.InitDsList(this); } public void WebSheetLoadBegin() { } public void CheckJsPostBack(string eventArg) { if (eventArg == PostMain) { try { // ShrlonClient ShrlonService = wcf.Shrlon; str_slippayout astr = new str_slippayout(); astr.member_no = WebUtil.MemberNoFormat(dsMain.DATA[0].MEMBER_NO); astr.sliptype_code = dsMain.DATA[0].SLIPTYPE_CODE; astr.slip_date = dsMain.DATA[0].SLIP_DATE; astr.operate_date = dsMain.DATA[0].OPERATE_DATE; wcf.NShrlon.of_initslippayout(state.SsWsPass, ref astr); dsMain.ResetRow(); dsMain.ImportData(astr.xml_sliphead); dsList.ResetRow(); dsList.ImportData(astr.xml_slipdet); } catch (Exception ex) { LtServerMessage.Text = WebUtil.ErrorMessage(ex); } } } public void SaveWebSheet() { try { str_slippayout astr = new str_slippayout(); astr.xml_sliphead = dsMain.ExportXml(); astr.xml_slipdet = dsList.ExportXml(); wcf.NShrlon.of_saveslip_payout(state.SsWsPass, ref astr); LtServerMessage.Text = WebUtil.CompleteMessage("บันทึกข้อมูลสำเร็จ"); } catch (Exception ex) { LtServerMessage.Text = WebUtil.ErrorMessage(ex); } } public void WebSheetLoadEnd() { } } }