コード例 #1
0
 /// <summary>
 /// 新增保养价格审核记录
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static int ApplyUpdatePrice(PriceUpdateAuditModel model)
 {
     using (var dbHelper = new SqlDbHelper(ConnectionHelper.GetDecryptConn("Gungnir")))
     {
         ApplyUpdatePrice(dbHelper, model.PID);
         return(dbHelper.ExecuteNonQuery(@" INSERT	INTO Configuration.dbo.tbl_BaoYangPriceUpdateAudit
                                                 (
                                                   PID,
                                                   ApplyPrice,
                                                   ApplyReason,
                                                   ApplyPerson,
                                                   ApplyDateTime,
                                                   AuditStatus )
                                            VALUES	(
                                                   @PID,
                                                   @Price,
                                                   @Reason,
                                                   @ApplyPerson,
                                                   GETDATE(),
                                                   0 )"        , CommandType.Text,
                                         new SqlParameter[] {
             new SqlParameter("@PID", model.PID),
             new SqlParameter("@Price", model.ApplyPrice),
             new SqlParameter("@Reason", model.ApplyReason),
             new SqlParameter("@ApplyPerson", model.ApplyPerson)
         }));
     }
 }
コード例 #2
0
        public ActionResult ApplyUpdatePrice(PriceUpdateAuditModel model)
        {
            if (model == null)
            {
                return(Json(-99));
            }
            model.ApplyPerson = ThreadIdentity.Operator.Name;
            var result = BaoYangPriceGuideManager.ApplyUpdatePrice(model);

            if (!Request.Url.Host.Contains(".tuhu.cn"))
            {
                TuhuMessage.SendEmail("[待审批]保养品价格修改申请", "[email protected],[email protected]", $"{ThreadIdentity.Operator.Name}于{DateTime.Now}申请将{model.PID}保养品价格修改为{model.ApplyPrice}元,超过系统预警线,请您审批!<br/><a href='http://setting.tuhu.cn/BaoYang/AuditPrice' target='_blank'>点此审核</a>");
            }
            else
            {
                TuhuMessage.SendEmail("[待审批]保养品价格修改申请", "[email protected],[email protected]", $"{ThreadIdentity.Operator.Name}于{DateTime.Now}申请将{model.PID}保养品价格修改为{model.ApplyPrice}元,超过系统预警线,请您审批!<br/><a href='http://setting.tuhu.cn/BaoYang/AuditPrice' target='_blank'>点此审核</a>");
            }
            return(Json(result));
        }
コード例 #3
0
 public static int ApplyUpdatePrice(PriceUpdateAuditModel model) => DalBaoYangPriceGuide.ApplyUpdatePrice(model);