コード例 #1
0
        /// <summary>
        /// 审核销售订单
        /// </summary>
        /// <returns></returns>
        public ActionResult Audite()
        {
            string SnNum         = WebUtil.GetFormValue <string>("SnNum");
            string CompanyID     = WebUtil.GetFormValue <string>("CompanyID", string.Empty);
            int    Status        = WebUtil.GetFormValue <int>("Status", (int)EAudite.NotPass);
            string AuditUser     = WebUtil.GetFormValue <string>("AuditUser", string.Empty);
            string Reason        = WebUtil.GetFormValue <string>("Reason", string.Empty);
            int    OperateType   = WebUtil.GetFormValue <int>("OperateType", 0);
            string EquipmentNum  = WebUtil.GetFormValue <string>("EquipmentNum");
            string EquipmentCode = WebUtil.GetFormValue <string>("EquipmentCode");
            string Remark        = WebUtil.GetFormValue <string>("Remark");

            SaleOrderEntity entity = new SaleOrderEntity();

            entity.SnNum        = SnNum;
            entity.CompanyID    = CompanyID;
            entity.Status       = Status;
            entity.AuditeStatus = Status;
            entity.Reason       = Reason;
            entity.Remark       = Remark;

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

            if ("1000" == returnValue)
            {
                result.Code    = (int)EResponseCode.Success;
                result.Message = "操作成功";
            }
            else if ("1001" == returnValue)
            {
                result.Code    = (int)EResponseCode.Exception;
                result.Message = "销售订单不存在";
            }
            else if ("1002" == returnValue)
            {
                result.Code    = (int)EResponseCode.Exception;
                result.Message = "销售订单已经审核";
            }
            return(Content(JsonHelper.SerializeObject(result)));
        }