þÿuse "xcontrol.vframe.vbusiness.vd" use "xbase.vframe.vbusiness.vd" unit trade [ class paymenSupplier : public frame { string Paymentmethod = ""; string currbox; int OnOK() { xaserverarg arg = GetParam(); if (currbox == "cbx1") { xedit cbx1_val1 = GetControl("cbx1_val1"); Paymentmethod = "ÛNÓT" + cbx1_val1.GetText() + "Y)QíSÑyhNØn"; } else if (currbox == "cbx2") { xedit cbx2_val1 = GetControl("cbx2_val1"); xedit cbx2_val2 = GetControl("cbx2_val2"); Paymentmethod = "N§RMh7xn‹¤T˜„NØ" + cbx2_val1.GetText() + "% [š‘Ñÿ OYk>" + cbx2_val2.GetText() + "Y)QíSÑyhNØn"; } else if (currbox == "cbx3") { xedit cbx3_val1 = GetControl("cbx3_val1"); xedit cbx3_val2 = GetControl("cbx3_val2"); xedit cbx3_val3 = GetControl("cbx3_val3"); Paymentmethod = "N§RMh7xn‹¤T˜„NØ" + cbx3_val1.GetText() + "% [š‘Ñÿ šŒ'ThR0Sэ'ÿ OYk>" + cbx3_val3.GetText() + "Y)QíSÑyhkcg,NØn"; } else if (currbox == "cbx4") { Paymentmethod = "šŒ'ThR0Sэ'"; } else if (currbox == "cbx5") { xedit cbx5_val1 = GetControl("cbx5_val1"); xedit cbx5_val2 = GetControl("cbx5_val2"); Paymentmethod = "šŒ'ThR0Sэ'ÿ OYk>" + cbx5_val2.GetText() + "Y)QíSÑyhNØn"; } else { Paymentmethod = ""; } arg.AddArg("PayType", Paymentmethod); CloseWindow(); return 1; } int OnCmdDispatch(string comdid) { if (comdid == "xmClose") { CloseWindow(); return 1; } else if (comdid == "xmOK") { OnOK(); } return 0; } int OnXCommand(ref TXCommandEvent evt, int p) { return OnCmdDispatch(evt.pStrID); } int OnCkbCLick(ref TEvent evt, int p) { int param = evt.lParam; xcheckbox cbx_1 = GetControl("cbx1"); int state1 = cbx_1.GetCheck(cbx_1.GetId()); xcheckbox cbx_2 = GetControl("cbx2"); int state2 = cbx_2.GetCheck(cbx_2.GetId()); xcheckbox cbx_3 = GetControl("cbx3"); int state3 = cbx_3.GetCheck(cbx_3.GetId()); xcheckbox cbx_4 = GetControl("cbx4"); int state4 = cbx_4.GetCheck(cbx_4.GetId()); xcheckbox cbx_5 = GetControl("cbx5"); int state5 = cbx_5.GetCheck(cbx_5.GetId()); if (param == cbx_1.GetId()) { cbx_2.SetUnCheck(cbx_2.GetId()); cbx_3.SetUnCheck(cbx_3.GetId()); cbx_4.SetUnCheck(cbx_4.GetId()); cbx_5.SetUnCheck(cbx_5.GetId()); if (state1 == 1) { currbox = "cbx1"; } else { currbox = ""; } } else if (param == cbx_2.GetId()) { cbx_1.SetUnCheck(cbx_1.GetId()); cbx_3.SetUnCheck(cbx_3.GetId()); cbx_4.SetUnCheck(cbx_4.GetId()); cbx_5.SetUnCheck(cbx_5.GetId()); if (state2 == 1) { currbox = "cbx2"; } else { currbox = ""; } } else if (param == cbx_3.GetId()) { cbx_1.SetUnCheck(cbx_1.GetId()); cbx_2.SetUnCheck(cbx_2.GetId()); cbx_4.SetUnCheck(cbx_4.GetId()); cbx_5.SetUnCheck(cbx_5.GetId()); if (state3 == 1) { currbox = "cbx3"; } else { currbox = ""; } } else if (param == cbx_4.GetId()) { cbx_1.SetUnCheck(cbx_1.GetId()); cbx_2.SetUnCheck(cbx_2.GetId()); cbx_3.SetUnCheck(cbx_3.GetId()); cbx_5.SetUnCheck(cbx_5.GetId()); if (state4 == 1) { currbox = "cbx4"; } else { currbox = ""; } } else if (param == cbx_5.GetId()) { cbx_1.SetUnCheck(cbx_1.GetId()); cbx_2.SetUnCheck(cbx_2.GetId()); cbx_3.SetUnCheck(cbx_3.GetId()); cbx_4.SetUnCheck(cbx_4.GetId()); if (state5 == 1) { currbox = "cbx5"; } else { currbox = ""; } } return 1; } int OnAttachEvent() { AttachEvent("WM_XCOMMAND", OnXCommand); AttachEvent("WM_COMMAND", OnCkbCLick); return 1; } int onload() { OnAttachEvent(); return 1; } }; ]