private void ibAssIn_Press(object sender, EventArgs e) { try { switch (Status) { case 2: throw new Exception("入库已完成!"); case 0: case 1: frmAssIn frmAssIn = new frmAssIn { POID = POID, IsFromPO = true }; Show(frmAssIn, (MobileForm sender1, object args) => { if (frmAssIn.ShowResult == ShowResult.Yes) { Bind(); } }); break; } } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 按ActionButton时 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmAssPurchaseOrderResult_ActionButtonPress(object sender, ActionButtonPressEventArgs e) { try { switch (e.Index) { case 0: //入库 switch (Status) { case 2: throw new Exception("入库已完成!"); case 0: case 1: frmAssIn frmAssIn = new frmAssIn { POID = POID, IsFromPO = true }; Show(frmAssIn, (MobileForm sender1, object args) => { if (frmAssIn.ShowResult == ShowResult.Yes) { Bind(); } }); break; } break; case 1: //退货 switch (Status) { case 0: throw new Exception("入库未开始,无法退货!"); case 2: case 1: frmAssReturn frmAssReturn = new frmAssReturn { POID = POID, IsFromPO = true }; Show(frmAssReturn, (MobileForm sender1, object args) => { if (frmAssReturn.ShowResult == ShowResult.Yes) { Bind(); } }); break; } break; } } catch (Exception ex) { Toast(ex.Message); } }