Example #1
0
        /// <summary>
        /// Updates a record in the BIEN_NHAN table.
        /// </summary>
        public void Update(BIENNHAN_DTO BienNhan)
        {
            ValidationUtility.ValidateArgument("BienNhan", BienNhan);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", BienNhan.Ma),
                new SqlParameter("@MA_HOA_DON", BienNhan.MaHoaDon),
                new SqlParameter("@NGAY_THANH_TOAN", BienNhan.NgayThanhToan),
                new SqlParameter("@MA_NHAN_VIEN", BienNhan.MaNhanVien),
                new SqlParameter("@SO_TIEN", BienNhan.SoTien)
            };

            SqlClientUtility.ExecuteNonQuery(m_ConnectionString, CommandType.StoredProcedure, "PROC_BienNhan_Update", parameters);
        }
Example #2
0
        /// <summary>
        /// Updates a record in the PedidoDetalle table.
        /// </summary>
        public void Update(PedidoDetalleEntidad pedidoDetalle)
        {
            ValidationUtility.ValidateArgument("pedidoDetalle", pedidoDetalle);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdPedidoDetalle", pedidoDetalle.IdPedidoDetalle),
                new SqlParameter("@IdPedido", pedidoDetalle.IdPedido),
                new SqlParameter("@Cantidad", pedidoDetalle.Cantidad),
                new SqlParameter("@PrecioUnitario", pedidoDetalle.PrecioUnitario),
                new SqlParameter("@IdProducto", pedidoDetalle.miProducto.IdProducto)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "PedidoDetalleUpdate", parameters);
        }
Example #3
0
        /// <summary>
        /// Saves a record to the Sol_Categories table.
        /// </summary>
        public virtual void Insert(Sol_Category Sol_Category)
        {
            ValidationUtility.ValidateArgument("Sol_Category", Sol_Category);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Description", Sol_Category.Description),
                new SqlParameter("@RefundAmount", Sol_Category.RefundAmount),
                new SqlParameter("@SubContainerQuantity", Sol_Category.SubContainerQuantity),
                new SqlParameter("@StagingMethodID", Sol_Category.StagingMethodID),
                new SqlParameter("@StagingProductID", Sol_Category.StagingProductID)
            };

            Sol_Category.CategoryID = (int)SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "Sol_Categories_Insert", parameters);
        }
Example #4
0
        public void Insert(ListaDeDeseoEntidad listaDeseo)
        {
            ValidationUtility.ValidateArgument("listaDeseo", listaDeseo);

            SqlParameter[] parameters = new SqlParameter[]
            {
                //new SqlParameter("@IdDeseo", listaDeseo.IdDeseo),
                new SqlParameter("@NumeroDocumento", listaDeseo.NumeroDocumento),
                new SqlParameter("@NombreUsuario", listaDeseo.NombreUsuario),
                new SqlParameter("@IdServicio", listaDeseo.IdServicio),
                new SqlParameter("@IdEstado", 1)
            };

            SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ListaDeseosInsert", parameters);
        }
Example #5
0
        /// <summary>
        /// Updates a record in the sol_WorkStations table.
        /// </summary>
        public virtual void Update(Sol_WorkStation sol_WorkStation)
        {
            ValidationUtility.ValidateArgument("sol_WorkStation", sol_WorkStation);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@WorkStationID", sol_WorkStation.WorkStationID),
                new SqlParameter("@Name", sol_WorkStation.Name),
                new SqlParameter("@Description", sol_WorkStation.Description),
                new SqlParameter("@Location", sol_WorkStation.Location),
                new SqlParameter("@ConveyorID", sol_WorkStation.ConveyorID)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "sol_WorkStations_Update", parameters);
        }
Example #6
0
        /// <summary>
        /// Updates a record in the sol_EntriesDetail table.
        /// </summary>
        public virtual void Update(Sol_EntriesDetail sol_EntriesDetail)
        {
            ValidationUtility.ValidateArgument("sol_EntriesDetail", sol_EntriesDetail);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@DetailID", sol_EntriesDetail.DetailID),
                new SqlParameter("@EntryID", sol_EntriesDetail.EntryID),
                new SqlParameter("@EntryType", sol_EntriesDetail.EntryType),
                new SqlParameter("@CashID", sol_EntriesDetail.CashID),
                new SqlParameter("@Count", sol_EntriesDetail.Count)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "sol_EntriesDetail_Update", parameters);
        }
Example #7
0
        /// <summary>
        /// Updates a record in the Sol_OrderCardLog table.
        /// </summary>
        public virtual void Update(Sol_OrderCardLog sol_OrderCardLog)
        {
            ValidationUtility.ValidateArgument("sol_OrderCardLog", sol_OrderCardLog);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@LogID", sol_OrderCardLog.LogID),
                new SqlParameter("@CardNumber", sol_OrderCardLog.CardNumber),
                new SqlParameter("@OrderID", sol_OrderCardLog.OrderID),
                new SqlParameter("@DateAdded", sol_OrderCardLog.DateAdded),
                new SqlParameter("@DatePaid", sol_OrderCardLog.DatePaid)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Sol_OrderCardLog_Update", parameters);
        }
Example #8
0
        /// <summary>
        /// Updates a record in the CT_DON_DAT_HANG table.
        /// </summary>
        public void Update(CTDONDATHANG_DTO CtDonDatHang)
        {
            ValidationUtility.ValidateArgument("CtDonDatHang", CtDonDatHang);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_DON_DAT_HANG", CtDonDatHang.MaDonDatHang),
                new SqlParameter("@MA_XE", CtDonDatHang.MaXe),
                new SqlParameter("@MA_MAU", CtDonDatHang.MaMau),
                new SqlParameter("@SO_LUONG", CtDonDatHang.SoLuong),
                new SqlParameter("@TONG_TIEN", CtDonDatHang.TongTien)
            };

            SqlClientUtility.ExecuteNonQuery(m_ConnectionString, CommandType.StoredProcedure, "PROC_CtDonDatHang_Update", parameters);
        }
Example #9
0
        /// <summary>
        /// Saves a record to the sol_Containers table.
        /// </summary>
        public virtual void Insert(Sol_Container sol_Container)
        {
            ValidationUtility.ValidateArgument("sol_Container", sol_Container);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Description", sol_Container.Description),
                new SqlParameter("@ShortDescription", sol_Container.ShortDescription),
                new SqlParameter("@ContainerTypeID", sol_Container.ContainerTypeID),
                new SqlParameter("@ShippingContainerID", sol_Container.ShippingContainerID),
                new SqlParameter("@ShippingContainerTypeID", sol_Container.ShippingContainerTypeID)
            };

            sol_Container.ContainerID = (int)SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "sol_Containers_Insert", parameters);
        }
Example #10
0
        public int Insert(RecursoEntidad recurso)
        {
            ValidationUtility.ValidateArgument("recurso", recurso);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CUIT", recurso.CUIT),
                new SqlParameter("@Recurso", recurso.Recurso),
                new SqlParameter("@Url", recurso.Url)
            };

            var valor = Convert.ToInt32(SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "RecursoInsert", parameters));

            return(valor);
        }
Example #11
0
        /// <summary>
        /// Saves a record to the Sol_EmployeesLog table.
        /// </summary>
        public virtual void Insert(Sol_EmployeesLog sol_EmployeesLog)
        {
            ValidationUtility.ValidateArgument("sol_EmployeesLog", sol_EmployeesLog);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@UserId", sol_EmployeesLog.UserId),
                new SqlParameter("@PunchInTime", sol_EmployeesLog.PunchInTime),
                new SqlParameter("@PunchOutTime", sol_EmployeesLog.PunchOutTime),
                new SqlParameter("@Comments", sol_EmployeesLog.Comments),
                new SqlParameter("@Approved", sol_EmployeesLog.Approved),
                new SqlParameter("@Modified", sol_EmployeesLog.Modified)
            };

            sol_EmployeesLog.LogId = (long)SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "Sol_EmployeesLog_Insert", parameters);
        }
Example #12
0
        /// <summary>
        /// Saves a record to the KHACH_HANG table.
        /// </summary>
        public void Insert(KHACHHANG_DTO KhachHang)
        {
            ValidationUtility.ValidateArgument("KhachHang", KhachHang);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@HO_TEN", KhachHang.HoTen),
                new SqlParameter("@PHAI", KhachHang.Phai),
                new SqlParameter("@DIA_CHI", KhachHang.DiaChi),
                new SqlParameter("@DIEN_THOAI", KhachHang.DienThoai),
                new SqlParameter("@CMND", KhachHang.Cmnd),
                new SqlParameter("@LOAI_KHACH_HANG", KhachHang.LoaiKhachHang)
            };

            KhachHang.Ma = (int)SqlClientUtility.ExecuteScalar(m_ConnectionString, CommandType.StoredProcedure, "PROC_KhachHang_Insert", parameters);
        }
Example #13
0
        /// <summary>
        /// Updates a record in the Vir_BagPosition table.
        /// </summary>
        public virtual void Update(Vir_BagPosition vir_BagPosition)
        {
            ValidationUtility.ValidateArgument("vir_BagPosition", vir_BagPosition);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@BagPositionID", vir_BagPosition.BagPositionID),
                new SqlParameter("@BagPositionName", vir_BagPosition.BagPositionName),
                new SqlParameter("@ProductID", vir_BagPosition.ProductID),
                new SqlParameter("@CurrentStageID", vir_BagPosition.CurrentStageID),
                new SqlParameter("@CurrentQuantity", vir_BagPosition.CurrentQuantity),
                new SqlParameter("@TargetQuantity", vir_BagPosition.TargetQuantity)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Vir_BagPosition_Update", parameters);
        }
Example #14
0
        public void Insert(DetalleComprobanteEntidad comprobanteDetalle)
        {
            ValidationUtility.ValidateArgument("comprobanteDetalle", comprobanteDetalle);

            SqlParameter[] parameters = new SqlParameter[]
            {
                // IdTipoComprobante 1= Factura y IdSucursal 1 = General Rodriguez
                new SqlParameter("@IdComprobante", comprobanteDetalle.MiComprobante.IdComprobante),
                new SqlParameter("@IdTipoComprobante", 1),
                new SqlParameter("@IdSucursal", 1),
                new SqlParameter("@IdServicio", comprobanteDetalle.MiServicio.IdServicio),
                new SqlParameter("@PrecioUnitario", comprobanteDetalle.PrecioUnitario)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ComprobanteDetalleInsert", parameters);
        }
        /// <summary>
        /// Saves a record to the PHIEU_DAT_XE table.
        /// </summary>
        public void Insert(PHIEUDATXE_DTO PhieuDatXe)
        {
            ValidationUtility.ValidateArgument("PhieuDatXe", PhieuDatXe);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_KHACH_HANG", PhieuDatXe.MaKhachHang),
                new SqlParameter("@MA_NHAN_VIEN", PhieuDatXe.MaNhanVien),
                new SqlParameter("@NGAY_DAT", PhieuDatXe.NgayDat),
                new SqlParameter("@NGAY_HEN_LAY", PhieuDatXe.NgayHenLay),
                new SqlParameter("@TONG_TIEN", PhieuDatXe.TongTien),
                new SqlParameter("@TIEN_TRA_TRUOC", PhieuDatXe.TienTraTruoc)
            };

            PhieuDatXe.Ma = (int)SqlClientUtility.ExecuteScalar(m_ConnectionString, CommandType.StoredProcedure, "PROC_PhieuDatXe_Insert", parameters);
        }
        /// <summary>
        /// Updates a record in the CHI_TIET_PHIEU_DAT_XE table.
        /// </summary>
        public void Update(CHITIETPHIEUDATXE_DTO ChiTietPhieuDatXe)
        {
            ValidationUtility.ValidateArgument("ChiTietPhieuDatXe", ChiTietPhieuDatXe);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", ChiTietPhieuDatXe.Ma),
                new SqlParameter("@MA_PHIEU_DAT", ChiTietPhieuDatXe.MaPhieuDat),
                new SqlParameter("@MA_XE", ChiTietPhieuDatXe.MaXe),
                new SqlParameter("@MA_MAU", ChiTietPhieuDatXe.MaMau),
                new SqlParameter("@SO_LUONG", ChiTietPhieuDatXe.SoLuong),
                new SqlParameter("@TONG_TIEN", ChiTietPhieuDatXe.TongTien)
            };

            SqlClientUtility.ExecuteNonQuery(m_ConnectionString, CommandType.StoredProcedure, "PROC_ChiTietPhieuDatXe_Update", parameters);
        }
Example #17
0
        /// <summary>
        /// Updates a record in the Syc_UpdateLog table.
        /// </summary>
        public virtual void Update(Syc_UpdateLog syc_UpdateLog)
        {
            ValidationUtility.ValidateArgument("syc_UpdateLog", syc_UpdateLog);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@TempID", syc_UpdateLog.TempID),
                new SqlParameter("@TableName", syc_UpdateLog.TableName),
                new SqlParameter("@IDName", syc_UpdateLog.IDName),
                new SqlParameter("@IDValue", syc_UpdateLog.IDValue),
                new SqlParameter("@ColumnName", syc_UpdateLog.ColumnName),
                new SqlParameter("@ColumnData", syc_UpdateLog.ColumnData)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Syc_UpdateLog_Update", parameters);
        }
        /// <summary>
        /// Updates a record in the CHI_TIET_HOA_DON table.
        /// </summary>
        public void Update(CHITIETHOADON_DTO ChiTietHoaDon)
        {
            ValidationUtility.ValidateArgument("ChiTietHoaDon", ChiTietHoaDon);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", ChiTietHoaDon.Ma),
                new SqlParameter("@MA_HOA_DON", ChiTietHoaDon.MaHoaDon),
                new SqlParameter("@MA_XE", ChiTietHoaDon.MaXe),
                new SqlParameter("@MA_MAU", ChiTietHoaDon.MaMau),
                new SqlParameter("@SO_LUONG", ChiTietHoaDon.SoLuong),
                new SqlParameter("@THANH_TIEN", ChiTietHoaDon.ThanhTien)
            };

            SqlClientUtility.ExecuteNonQuery(m_ConnectionString, CommandType.StoredProcedure, "PROC_ChiTietHoaDon_Update", parameters);
        }
        /// <summary>
        /// Updates a record in the Reserva table.
        /// </summary>
        public void Update(ReservaEntidad reserva)
        {
            ValidationUtility.ValidateArgument("reserva", reserva);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdReserva", reserva.IdReserva),
                new SqlParameter("@IdPedido", reserva.IdPedido),
                new SqlParameter("@IdPedidoDetalle", reserva.IdPedidoDetalle),
                new SqlParameter("@IdSucursal", reserva.IdSucursal),
                new SqlParameter("@Activo", reserva.Activo),
                new SqlParameter("@Fecha", reserva.Fecha)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ReservaUpdate", parameters);
        }
Example #20
0
        public void Insert(ItemOrdenDeTrabajoEntidad listaItemODT)
        {
            ValidationUtility.ValidateArgument("listaItem", listaItemODT);

            SqlParameter[] parameters = new SqlParameter[]
            {
                //new SqlParameter("@IdDeseo", listaDeseo.IdDeseo),
                new SqlParameter("@IdUsuario", listaItemODT.MiUsuario.IdUsuario),
                new SqlParameter("@NombreUsuario", listaItemODT.NombreUsuario),
                new SqlParameter("@IdServicio", listaItemODT.MiServicio.IdServicio),
                new SqlParameter("@IdOrdenDeTrabajo", listaItemODT._MiOrdenDeTrabajo.IdOrdenDeTrabajo),
                new SqlParameter("@Precio", listaItemODT.Precio)
            };

            SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ListaItemInsert", parameters);
        }
        /// <summary>
        /// Saves a record to the Direccion table.
        /// </summary>
        public void Insert(DireccionEntidad direccion)
        {
            ValidationUtility.ValidateArgument("direccion", direccion);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Calle", direccion.Calle),
                new SqlParameter("@Numero", direccion.Numero),
                new SqlParameter("@Piso", direccion.Piso),
                new SqlParameter("@Departamento", direccion.Departamento),
                new SqlParameter("@Localidad", direccion.Localidad),
                new SqlParameter("@IdProvincia", direccion.IdProvincia),
                new SqlParameter("@IdTipoDireccion", direccion.IdTipoDireccion)
            };

            direccion.IdDireccion = (int)SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "DireccionInsert", parameters);
        }
Example #22
0
        /// <summary>
        /// Updates a record in the Comprobante table.
        /// </summary>
        public void Update(ComprobanteEntidad comprobante)
        {
            ValidationUtility.ValidateArgument("comprobante", comprobante);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@NroComprobante", comprobante.NroComprobante),
                new SqlParameter("@IdSucursal", comprobante.miSucursal.IdSucursal),
                new SqlParameter("@CUIT", comprobante.CUIT),
                new SqlParameter("@IdTipoComprobante", comprobante.miTipoComprobante.IdTipoComprobante),
                new SqlParameter("@IdComprobante", comprobante.IdComprobante),
                new SqlParameter("@FechaComprobante", comprobante.FechaComprobante),
                new SqlParameter("@IdPedido", comprobante.IdPedido)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ComprobanteUpdate", parameters);
        }
Example #23
0
        /// <summary>
        /// Updates a record in the Sac_MoneyInventory table.
        /// </summary>
        public virtual void Update(Sac_MoneyInventory sac_MoneyInventory)
        {
            ValidationUtility.ValidateArgument("sac_MoneyInventory", sac_MoneyInventory);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ClientID", sac_MoneyInventory.ClientID),
                new SqlParameter("@MoneyID", sac_MoneyInventory.MoneyID),
                new SqlParameter("@BillDispenserID", sac_MoneyInventory.BillDispenserID),
                new SqlParameter("@Address", sac_MoneyInventory.Address),
                new SqlParameter("@Inventory", sac_MoneyInventory.Inventory),
                new SqlParameter("@MaxNumBills", sac_MoneyInventory.MaxNumBills),
                new SqlParameter("@FullQuantity", sac_MoneyInventory.FullQuantity)
            };

            SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "Sac_MoneyInventory_Update", parameters);
        }
        /// <summary>
        /// Saves a record to the Producto table.
        /// </summary>
        public void Insert(ProductoEntidad producto)
        {
            ValidationUtility.ValidateArgument("producto", producto);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CodigoProducto", producto.CodigoProducto),
                new SqlParameter("@PrecioUnitario", producto.PrecioUnitario),
                new SqlParameter("@IdMarca", producto.IdMarca),
                new SqlParameter("@CUIT", producto.CUIT),
                new SqlParameter("@IdIvaProducto", producto.IdIvaProducto),
                new SqlParameter("@DescripProducto", producto.DescripProducto),
                new SqlParameter("@URL", producto.URL)
            };

            producto.IdProducto = (int)SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ProductoInsert", parameters);
        }
Example #25
0
        public void UpdateDireccionEmpleado(DireccionEntidad direccion)
        {
            ValidationUtility.ValidateArgument("direccion", direccion);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdDireccion", direccion.IdDireccion),
                new SqlParameter("@Calle", direccion.Calle),
                new SqlParameter("@Numero", direccion.Numero),
                new SqlParameter("@Piso", direccion.Piso),
                new SqlParameter("@Departamento", direccion.Departamento),
                new SqlParameter("@IdProvincia", direccion.MiProvincia.IdProvincia),
                new SqlParameter("@IdLocalidad", direccion.MiLocalidad.IdLocalidad),
            };

            SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "UpdateDireccionEmpleado", parameters);
        }
        /// <summary>
        /// Saves a record to the HOA_DON table.
        /// </summary>
        public void Insert(HOADON_DTO HoaDon)
        {
            ValidationUtility.ValidateArgument("HoaDon", HoaDon);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_KHACH_HANG", HoaDon.MaKhachHang),
                new SqlParameter("@MA_NHAN_VIEN", HoaDon.MaNhanVien),
                new SqlParameter("@NGAY_LAP", HoaDon.NgayLap),
                new SqlParameter("@KIEU_THANH_TOAN", HoaDon.KieuThanhToan),
                new SqlParameter("@TONG_TIEN", HoaDon.TongTien),
                new SqlParameter("@TIEN_TRA_MOI_DOT", HoaDon.TienTraMoiDot),
                new SqlParameter("@SO_LAN_TRA", HoaDon.SoLanTra)
            };

            HoaDon.Ma = (int)SqlClientUtility.ExecuteScalar(m_ConnectionString, CommandType.StoredProcedure, "PROC_HoaDon_Insert", parameters);
        }
Example #27
0
        public void Insert(ServicioEntidad servicio)
        {
            ValidationUtility.ValidateArgument("servicio", servicio);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Titulo", servicio.Titulo),
                new SqlParameter("@Descripcion", servicio.Descripcion),
                new SqlParameter("@Precio", servicio.Precio),
                new SqlParameter("@URLimagen", servicio.URLimagen)
            };

            var resultado     = (decimal)SqlClientUtility.ExecuteScalar(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ServicioInsert", parameters);
            int IdServicioRes = decimal.ToInt32(resultado);

            servicio.IdServicio = IdServicioRes;
        }
Example #28
0
        /// <summary>
        /// Saves a record to the sol_CashDenominations table.
        /// </summary>
        public virtual void Insert(Sol_CashDenomination sol_CashDenomination)
        {
            ValidationUtility.ValidateArgument("sol_CashDenomination", sol_CashDenomination);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CashType", sol_CashDenomination.CashType),
                new SqlParameter("@CashValue", sol_CashDenomination.CashValue),
                new SqlParameter("@Description", sol_CashDenomination.Description),
                new SqlParameter("@OrderValue", sol_CashDenomination.OrderValue),
                new SqlParameter("@CashItemValue", sol_CashDenomination.CashItemValue),
                new SqlParameter("@Quantity", sol_CashDenomination.Quantity),
                new SqlParameter("@MoneyID", sol_CashDenomination.MoneyID)
            };

            sol_CashDenomination.CashID = (int)SqlClientUtility.ExecuteScalar(connectionStringName, CommandType.StoredProcedure, "sol_CashDenominations_Insert", parameters);
        }
Example #29
0
        public void Update(TarjetaEntidad tarjeta)
        {
            ValidationUtility.ValidateArgument("tarjeta", tarjeta);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdTarjeta", tarjeta.IdTarjeta),

                new SqlParameter("@IdTipoTarjeta", tarjeta.MiTipoTarjeta.IdTipoTarjeta),
                new SqlParameter("@NombreTitular", tarjeta.NombreTitular),
                new SqlParameter("@NumeroTarjeta", tarjeta.NumeroTarjeta),
                new SqlParameter("@FechaVencimiento", tarjeta.FechaVencimiento),
                new SqlParameter("@CodigoSeguridad", tarjeta.CodigoSeguridad),
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "TarjetaUpdate", parameters);
        }
        /// <summary>
        /// Updates a record in the ComprobanteDetalle table.
        /// </summary>
        public void Update(ComprobanteDetalleEntidad comprobanteDetalle)
        {
            ValidationUtility.ValidateArgument("comprobanteDetalle", comprobanteDetalle);

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdComprobanteDetalle", comprobanteDetalle.IdComprobanteDetalle),
                new SqlParameter("@NroComprobante", comprobanteDetalle.NroComprobante),
                new SqlParameter("@IdSucursal", comprobanteDetalle.IdSucursal),
                new SqlParameter("@IdTipoComprobante", comprobanteDetalle.IdTipoComprobante),
                new SqlParameter("@CUIT", comprobanteDetalle.CUIT),
                new SqlParameter("@IdProducto", comprobanteDetalle.IdProducto),
                new SqlParameter("@CantidadProducto", comprobanteDetalle.CantidadProducto),
                new SqlParameter("@PrecioUnitarioFact", comprobanteDetalle.PrecioUnitarioFact)
            };

            SqlClientUtility.ExecuteNonQuery(SqlClientUtility.connectionStringName, CommandType.StoredProcedure, "ComprobanteDetalleUpdate", parameters);
        }