Exemple #1
0
        public ActionResult checkdata(string key, string no, int status)
        {
            ReturnValue back = new ReturnValue {
                status = true
            };

            if (key == "require")
            {
                #region 采购申请
                back.status = purchaseService.ChangeRequireStatus(no, status, Masterpage.CurrUser.name);
                #endregion
            }
            else if (key == "purchase")
            {
                back.status = purchaseService.ChangePurchaseStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "stockin")
            {
                back.status = stockinService.ChangeStockInStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "stockout")
            {
                back = stockoutService.ChangeStockOutStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "stockchange")
            {
                back = stockoutService.ChangeChangeOtNStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "orderreturn")
            {
                back = stockinService.ChangeReturnStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "stockreturn")
            {
                back = stockoutService.ChangeStockReturnStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "bomorder")
            {
                back = bomService.ChangeBomOrderStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "bill")
            {
                back.status = manageService.ChangeBillStatus(no, status, Masterpage.CurrUser.staffid);
            }
            else if (key == "settle" || key == "pay")
            {
                back.status = manageService.ChangeSettleStatus(no, status, Masterpage.CurrUser.staffid);
            }
            else if (key == "delegate")
            {
                back = bomService.ChangeDelegateStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "produce")
            {
                back = bomService.ChangeProductionStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "delegatesend")
            {
                back = bomService.ChangeDelegateSendStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "delegateback")
            {
                back = bomService.ChangeDelegateBackStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "producepull")
            {
                back = bomService.ChangeProductPullStatus(no, status, Masterpage.CurrUser.name);
            }
            else if (key == "producegive")
            {
                back = bomService.ChangeProductGiveStatus(no, status, Masterpage.CurrUser.name);
            }
            return(Json(back, JsonRequestBehavior.AllowGet));
        }