Ejemplo n.º 1
0
        public ResponseBo DeleteShortCutGroup(PosProductShortCutGroupBo 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);

                    conn.Execute("spPosProductShortCutGroupDelete", 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);
        }
Ejemplo n.º 2
0
        public ResponseDto DeleteShortCutGroup(PosProductShortCutGroupDto posProductShortCutGroupDto)
        {
            ResponseDto responseDto = new ResponseDto();

            PosProductShortCutGroupBo posProductShortCutGroupBo = new PosProductShortCutGroupBo()
            {
                Id     = posProductShortCutGroupDto.Id,
                Name   = posProductShortCutGroupDto.Name,
                ShopId = posProductShortCutGroupDto.ShopId,

                Session = Session
            };

            ResponseBo responseBo = posBusiness.DeleteShortCutGroup(posProductShortCutGroupBo);

            responseDto = responseBo.ToResponseDto();

            return(responseDto);
        }