コード例 #1
0
 private void btnPut_Click(object sender, EventArgs e)
 {
     try
     {
         int num = 0;
         int.TryParse(txtPutNum.Text.Trim(), out num);
         var latticeInfo = slaveInfoService.GetLatticeInfo(LatticeNo);
         //验证
         if (slaveInfoService.Status != Domain.Models.LatticeStatus.WaitPut)
         {
             MessageBox.Show("非待投递状态,无法触发已投递");
             return;
         }
         upDownService.PutIng(new UpDownMessage()
         {
             LatticeByUpDown = new List <LatticeByUpDown>()
             {
                 new LatticeByUpDown()
                 {
                     LatticeNo = LatticeNo, Num = num
                 }
             },
             Type = txtType.Text.Trim()
         });
         buttonService.UpdateButton(latticeInfo);
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }