using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using QMAPP.FJC.Entity.Operation; using QMAPP.ServicesAgent; using QMAPP.KB.Entity; namespace QMAPP.WinForm.Forms.Injection { public partial class CastCounterSet : Form { public CastCounterSet() { InitializeComponent(); } private void CastCounterSet_Load(object sender, EventArgs e) { QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); CastCounter result = agent.InvokeServiceFunction(B9BasicService.CastCounterBLL_Get.ToString()); comSwitchSet.Text = (result.ISCOUNTER == 1) ? "是" : "否"; nbValue.Value = result.COUNTERINTERNAL; } private void tsbSave_Click(object sender, EventArgs e) { CastCounter cast = new CastCounter(); cast.ISCOUNTER = comSwitchSet.Text == "是" ? 1 : 0; cast.COUNTERINTERNAL = Convert.ToInt32(this.nbValue.Value); QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); DataResult result = agent.InvokeServiceFunction(B9BasicService.CastCounterBLL_Update.ToString(), cast); if (result.IsSuccess) { MessageBox.Show("保存成功!", "提示"); } else { MessageBox.Show("保存失败!", "提示"); } } private void tsbClose_Click(object sender, EventArgs e) { this.Close(); } } }