public ResponseBo UpdateOrderGeneral(ShopOrderGeneralBo updateBo) { ResponseBo responseBo = new ResponseBo(); try { string OrderAccountListRawJson = null; if (updateBo.OrderAccountList != null && updateBo.OrderAccountList.Count() > 0) { OrderAccountListRawJson = JsonConvert.SerializeObject(updateBo.OrderAccountList); } string OrderCurrencyListRawJson = null; if (updateBo.OrderCurrencyList != null && updateBo.OrderCurrencyList.Count() > 0) { OrderCurrencyListRawJson = JsonConvert.SerializeObject(updateBo.OrderCurrencyList); } using (SqlConnection conn = DbAccess.Connection.GetConn()) { var p = new DynamicParameters(); p.Add("@Message", dbType: DbType.String, direction: ParameterDirection.Output, size: 255); p.Add("@IsSuccess", dbType: DbType.Boolean, direction: ParameterDirection.Output); p.Add("@TakesOrder", updateBo.TakesOrder, DbType.Boolean, ParameterDirection.Input); p.Add("@OrderAccountListRawJson", OrderAccountListRawJson, DbType.String, ParameterDirection.Input, 4000); p.Add("@OrderCurrencyListRawJson", OrderCurrencyListRawJson, DbType.String, ParameterDirection.Input, 4000); p.Add("@ShopId", updateBo.PersonId, DbType.Int64, ParameterDirection.Input); p.Add("@OperatorRealId", updateBo.Session.RealPerson.Id, DbType.Int64, ParameterDirection.Input); p.Add("@LanguageId", updateBo.Session.RealPerson.LanguageId, DbType.Int32, ParameterDirection.Input); var user = conn.Execute("spShopOrderUpdate", p, commandType: CommandType.StoredProcedure); responseBo.Message = p.Get <string>("@Message"); responseBo.IsSuccess = p.Get <bool>("@IsSuccess"); } } catch (Exception ex) { responseBo = base.SaveExLog(ex, this.GetType(), MethodBase.GetCurrentMethod().Name, updateBo); } return(responseBo); }
public ResponseDto UpdateOrderGeneral(ShopOrderGeneralDto updateDto) { ResponseDto responseDto = new ResponseDto(); ShopOrderGeneralBo updateBo = new ShopOrderGeneralBo() { PersonId = updateDto.PersonId, TakesOrder = updateDto.TakesOrder, OrderAccountList = updateDto.OrderAccountList, OrderCurrencyList = updateDto.OrderCurrencyList, Session = Session }; responseDto = shopPersonBusiness.UpdateOrderGeneral(updateBo).ToResponseDto(); return(responseDto); }