Пример #1
0
 /// <summary>
 /// 开始盘点
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnStart_Press(object sender, EventArgs e)
 {
     try
     {
         AddAIResultInputDto inputDto = new AddAIResultInputDto {
             IID = lblName.BindDataValue.ToString()
         };
         var        inventory  = _autofacConfig.AssInventoryService.GetAssInventoryById(lblName.BindDataValue.ToString());
         ReturnInfo returnInfo = _autofacConfig.AssInventoryService.AddAssInventoryResult(inputDto);
         if (returnInfo.IsSuccess)
         {
             frmAssInventory assets = (frmAssInventory)Form;
             assets.Bind();
             frmAssInventoryResult result = new frmAssInventoryResult {
                 IID = lblName.BindDataValue.ToString(), WAREID = inventory.WAREID, DepartmentId = inventory.SLID, typeId = inventory.TYPEID
             };
             assets.Show(result, (MobileForm sender1, object args) =>
             {
                 if (result.ShowResult == ShowResult.Yes || result.ShowResult == ShowResult.None)
                 {
                     assets.Bind();
                 }
             });
         }
         else
         {
             Toast(returnInfo.ErrorInfo);
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
Пример #2
0
 /// <summary>
 /// 点击,查看盘点单详情
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void panel1_Press(object sender, EventArgs e)
 {
     try
     {
         var inventory = _autofacConfig.AssInventoryService.GetAssInventoryById(lblName.BindDataValue.ToString());
         frmAssInventoryResult result = new frmAssInventoryResult {
             IID = lblName.BindDataValue.ToString(), WAREID = inventory.WAREID, DepartmentId = inventory.SLID, typeId = inventory.TYPEID
         };
         frmAssInventory frmAssInventory = (frmAssInventory)Form;
         frmAssInventory.Show(result, (MobileForm sender1, object args) =>
         {
             if (result.ShowResult == ShowResult.Yes || result.ShowResult == ShowResult.None)
             {
                 frmAssInventory.Bind();
             }
         });
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }