Exemplo n.º 1
0
        /// <summary>
        /// 取消销售订单
        /// </summary>
        /// <returns></returns>
        public ActionResult Cancel()
        {
            string          SnNum     = WebUtil.GetFormValue <string>("SnNum");
            string          CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty);
            SaleOrderEntity entity    = new SaleOrderEntity();

            entity.SnNum     = SnNum;
            entity.CompanyID = CompanyID;
            Bill <SaleOrderEntity, SaleDetailEntity> bill = new SaleOrder(CompanyID);
            string     returnValue = bill.Cancel(entity);
            DataResult result      = new DataResult();

            if (EnumHelper.GetEnumDesc <EReturnStatus>(EReturnStatus.Success) == returnValue)
            {
                result.Code    = (int)EResponseCode.Success;
                result.Message = "操作成功";
            }
            else
            {
                result.Code    = (int)EResponseCode.Exception;
                result.Message = "操作失败";
            }
            return(Content(JsonHelper.SerializeObject(result)));
        }