public ResponseBo DeleteShortCut(PosProductShortCutBo deleteBo) { 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("@LanguageId", deleteBo.Session.RealPerson.LanguageId, DbType.Int32, ParameterDirection.Input); p.Add("@OperatorRealId", deleteBo.Session.RealPerson.Id, DbType.Int64, ParameterDirection.Input); p.Add("@Id", deleteBo.Id, DbType.Int64, ParameterDirection.Input); p.Add("@ShopId", deleteBo.ShopId, DbType.Int64, ParameterDirection.Input); //p.Add("@ProductId", posProductShortCutBo.ProductId, DbType.Int64, ParameterDirection.Input); // we dont need this. p.Add("@GroupId", deleteBo.GroupId, DbType.Int64, ParameterDirection.Input); conn.Execute("spPosProductShortCutDelete", 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, deleteBo); } return(responseBo); }
public ResponseDto SaveShortCut(PosProductShortCutDto posProductShortCutDto) { ResponseDto responseDto = new ResponseDto(); PosProductShortCutBo posProductShortCutBo = new PosProductShortCutBo() { ShopId = posProductShortCutDto.ShopId, ProductId = posProductShortCutDto.ProductId, GroupId = posProductShortCutDto.GroupId, Session = Session }; ResponseBo responseBo = posBusiness.SaveShortCut(posProductShortCutBo); responseDto = responseBo.ToResponseDto(); return(responseDto); }