public ResponseDto UpdateWorkinghours(ShopWorkingHoursDto updateDto) { ResponseDto responseDto = new ResponseDto(); ShopWorkingHoursBo updateBo = new ShopWorkingHoursBo() { PersonId = updateDto.PersonId, MonStartEnd = updateDto.MonStartEnd, TuesStartEnd = updateDto.TuesStartEnd, WedStartEnd = updateDto.WedStartEnd, ThursStartEnd = updateDto.ThursStartEnd, FriStartEnd = updateDto.FriStartEnd, SatStartEnd = updateDto.SatStartEnd, SunStartEnd = updateDto.SunStartEnd, TakesOrderOutTime = updateDto.TakesOrderOutTime, Session = Session }; responseDto = shopPersonBusiness.UpdateWorkingHours(updateBo).ToResponseDto(); return(responseDto); }
public ResponseBo UpdateWorkingHours(ShopWorkingHoursBo updateBo) { ResponseBo responseBo = new ResponseBo(); try { 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("@MonStartEnd ", updateBo.MonStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@TuesStartEnd ", updateBo.TuesStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@WedStartEnd ", updateBo.WedStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@ThursStartEnd ", updateBo.ThursStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@FriStartEnd ", updateBo.FriStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@SatStartEnd ", updateBo.SatStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@SunStartEnd ", updateBo.SunStartEnd, DbType.String, ParameterDirection.Input, 8); p.Add("@TakesOrderOutTime ", updateBo.TakesOrderOutTime, DbType.Boolean, ParameterDirection.Input); 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("spShopWorkingHoursUpdate", 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); }