Пример #1
0
        private void ibAssRetiring_Press(object sender, EventArgs e)
        {
            try
            {
                switch (Status)
                {
                case 0:
                    throw new Exception("未开始出库,无法退库!");

                case 2:
                case 1:
                    frmAssRetiring frmAssRetiring = new frmAssRetiring
                    {
                        SOID     = SOID,
                        IsFromSO = true
                    };
                    Show(frmAssRetiring, (MobileForm sender1, object args) =>
                    {
                        if (frmAssRetiring.ShowResult == ShowResult.Yes)
                        {
                            Bind();
                        }
                    });
                    break;
                }
            }
            catch (Exception ex)
            {
                Toast(ex.Message);
            }
        }
Пример #2
0
        /// <summary>
        /// 按ActionButton时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmAssSalesOrderResult_ActionButtonPress(object sender, ActionButtonPressEventArgs e)
        {
            try
            {
                switch (e.Index)
                {
                case 0:
                    //出库
                    switch (Status)
                    {
                    case 2:
                        throw new Exception("出库已完成!");

                    case 0:
                    case 1:
                        frmAssOut frmAssOut = new frmAssOut
                        {
                            SOID     = SOID,
                            IsFromSO = true
                        };
                        Show(frmAssOut, (MobileForm sender1, object args) =>
                        {
                            if (frmAssOut.ShowResult == ShowResult.Yes)
                            {
                                Bind();
                            }
                        });
                        break;
                    }
                    break;

                case 1:
                    //退库
                    switch (Status)
                    {
                    case 0:
                        throw new Exception("未开始出库,无法退库!");

                    case 2:
                    case 1:
                        frmAssRetiring frmAssRetiring = new frmAssRetiring
                        {
                            SOID     = SOID,
                            IsFromSO = true
                        };
                        Show(frmAssRetiring, (MobileForm sender1, object args) =>
                        {
                            if (frmAssRetiring.ShowResult == ShowResult.Yes)
                            {
                                Bind();
                            }
                        });
                        break;
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                Toast(ex.Message);
            }
        }