public bool Guardar() { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_AgregarTarifario"; Comando.Parameters.Add("@UidRegistro", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidRegistro"].Value = UidTarifario; Comando.Parameters.Add("@UidRelacionZR", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidRelacionZR"].Value = UidRelacionZR; Comando.Parameters.Add("@UidRelacionZE", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidRelacionZE"].Value = UidRelacionZE; Comando.Parameters.Add("@MCosto", SqlDbType.Decimal); Comando.Parameters["@MCosto"].Value = DPrecio; resultado = CN.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Guardar(SubCategoria Subcat) { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_AgregaSubCategoria"; Comando.Parameters.Add("@UidSubcategoria", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSubcategoria"].Value = Subcat.UID; Comando.Parameters.Add("@UidCategoria", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidCategoria"].Value = Subcat.UIDCATEGORIA; Comando.Parameters.Add("@VchNombre", SqlDbType.NVarChar, 50); Comando.Parameters["@VchNombre"].Value = Subcat.STRNOMBRE; Comando.Parameters.Add("@VchDescripcion", SqlDbType.NVarChar, 100); Comando.Parameters["@VchDescripcion"].Value = Subcat.STRDESCRIPCION; Comando.Parameters.Add("@intEstatus", SqlDbType.Int); Comando.Parameters["@intEstatus"].Value = Subcat.oEstatus.ID; resultado = Conn.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Guardar(Giro Objeto) { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_AgregaGiro"; Comando.Parameters.Add("@UidGiro", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidGiro"].Value = Objeto.UID; Comando.Parameters.Add("@VchNombre", SqlDbType.NVarChar, 100); Comando.Parameters["@VchNombre"].Value = Objeto.STRNOMBRE; Comando.Parameters.Add("@VchDescripcion", SqlDbType.NVarChar, 100); Comando.Parameters["@VchDescripcion"].Value = Objeto.STRDESCRIPCION; Comando.Parameters.Add("@IntEstatus", SqlDbType.Int); Comando.Parameters["@IntEstatus"].Value = Objeto.ESTATUS; resultado = Con.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public virtual bool GUARDARIMAGEN(Imagen img, Guid UidUsuario, string StoreProcedure) { bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = StoreProcedure; cmd.Parameters.Add("@UidImagen", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidImagen"].Value = img.ID; cmd.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidUsuario"].Value = UidUsuario; cmd.Parameters.Add("@NVchRuta", SqlDbType.NVarChar, 500); cmd.Parameters["@NVchRuta"].Value = img.STRRUTA; cmd.Parameters.Add("@NVchDescripcion", SqlDbType.NVarChar, 200); cmd.Parameters["@NVchDescripcion"].Value = img.STRDESCRIPCION; resultado = Conn.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public bool Actualiza() { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizaSeccion"; Comando.Parameters.Add("@UidSeccion", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSeccion"].Value = this.UID; Comando.Parameters.Add("@VchNombre", SqlDbType.NVarChar, 30); Comando.Parameters["@VchNombre"].Value = this.StrNombre; Comando.Parameters.Add("@VchHoraInicio", SqlDbType.NVarChar, 10); Comando.Parameters["@VchHoraInicio"].Value = this.StrHoraInicio; Comando.Parameters.Add("@VchHoraFin", SqlDbType.NVarChar, 10); Comando.Parameters["@VchHoraFin"].Value = this.StrHoraFin; Comando.Parameters.Add("@IntEstatus", SqlDbType.Int); Comando.Parameters["@IntEstatus"].Value = this.oEstatus.ID; Con = new Conexion(); resultado = Con.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Actualizar() { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizaOferta"; Comando.Parameters.Add("@UidOferta", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidOferta"].Value = UID; Comando.Parameters.Add("@VchNombre", SqlDbType.NVarChar, 100); Comando.Parameters["@VchNombre"].Value = STRNOMBRE; Comando.Parameters.Add("@IntEstatus", SqlDbType.Int); Comando.Parameters["@IntEstatus"].Value = oEstatus.ID; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool GuardarRepartidor(Guid uidUsuario, Guid uidVehiculo, Guid Uid) { Conexion = new Conexion(); bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_GuardarUsuarioVehiculo"; cmd.Parameters.Add("@UidRegistro", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidRegistro"].Value = Uid; cmd.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidUsuario"].Value = uidUsuario; cmd.Parameters.Add("@UidVehiculo", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidVehiculo"].Value = uidVehiculo; resultado = Conexion.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public void AsingaOrdenRepartidor(Guid UidTurnoRepartidor, Guid UidSucursal, Guid UidOrdenRepartidor) { Conexion = new Conexion(); bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_AsignarOrdenRepartidor"; cmd.Parameters.Add("@UidTurnoRepartidor", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidTurnoRepartidor"].Value = UidTurnoRepartidor; cmd.Parameters.Add("@UidOrden", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidOrden"].Value = UidSucursal; cmd.Parameters.Add("@UidOrdenRepartidor", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidOrdenRepartidor"].Value = UidOrdenRepartidor; resultado = Conexion.ModificarDatos(cmd); } catch (Exception) { throw; } }
public bool AgregaZonaDeServicio(Guid UidRelacion, Guid uidsucursal, Guid uidcolonia, string strParametro) { Conexion = new Conexion(); bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_GuardaZonaDeServicio"; cmd.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidSucursal"].Value = uidsucursal; cmd.Parameters.Add("@UidRelacion", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidRelacion"].Value = UidRelacion; cmd.Parameters.Add("@Parametro", SqlDbType.VarChar, 10); cmd.Parameters["@Parametro"].Value = strParametro; cmd.Parameters.Add("@UidColonia", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidColonia"].Value = uidcolonia; resultado = Conexion.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public bool AsociarConSucursal(Guid UidSucursal) { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_AgregarMensajeSucursal"; Comando.Parameters.Add("@UidMensaje", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidMensaje"].Value = Uid; Comando.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSucursal"].Value = UidSucursal; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public void TurnoSuministradora() { SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_ControlTurnoSuministradora"; //Dato1 if (UidTurno != null && UidTurno != Guid.Empty) { cmd.Parameters.Add("@UidTurnoSuministradora", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidTurnoSuministradora"].Value = UidTurno; } if (UidLicencia != null && UidLicencia != Guid.Empty) { cmd.Parameters.Add("@UidLicencia", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidLicencia"].Value = UidLicencia; } cmd.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidUsuario"].Value = UidUsuario; oConexion = new Conexion(); //Mandar comando a ejecución oConexion.ModificarDatos(cmd); } catch (Exception) { throw; } }
public bool Actualiza() { SqlCommand cmd = new SqlCommand(); bool resultado = false; try { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "asp_ActualizaTelefono"; cmd.Parameters.Add("@IdTelefono", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdTelefono"].Value = ID; cmd.Parameters.Add("@idTipoDeTelefono", SqlDbType.UniqueIdentifier); cmd.Parameters["@idTipoDeTelefono"].Value = new Guid(Tipo); cmd.Parameters.Add("@Numero", SqlDbType.NVarChar, 30); cmd.Parameters["@Numero"].Value = NUMERO; cn = new Conexion(); resultado = cn.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public bool Actualizar() { bool resultado = false; oConexion = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizarCuenta "; Comando.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidUsuario"].Value = usuario.ID;; Comando.Parameters.Add("@UidCodigo", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidCodigo"].Value = CodigoActivacion; Comando.Parameters.Add("@IntEstatus", SqlDbType.Int); Comando.Parameters["@IntEstatus"].Value = estatus.ID; resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool GuardaTelefono(Guid idPropietario, string Parametro) { SqlCommand cmd = new SqlCommand(); bool resultado = false; try { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "asp_AgregarTelefono"; cmd.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidUsuario"].Value = idPropietario; cmd.Parameters.Add("@UidTelefono", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidTelefono"].Value = ID; cmd.Parameters.Add("@TipoDeTelefono", SqlDbType.UniqueIdentifier); cmd.Parameters["@TipoDeTelefono"].Value = new Guid(Tipo); cmd.Parameters.Add("@Numero", SqlDbType.NVarChar, 30); cmd.Parameters["@Numero"].Value = NUMERO; cmd.Parameters.Add("@ParametroDeAgregacion", SqlDbType.NVarChar, 30); cmd.Parameters["@ParametroDeAgregacion"].Value = Parametro; cn = new Conexion(); resultado = cn.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public virtual bool RELACIONSUBCATEGORIA(Guid uidsubategoria, Guid UidSucursal) { Conexion = new Conexion(); bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_AgregaSucursalSubcategoria"; cmd.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidSucursal"].Value = UidSucursal; cmd.Parameters.Add("@UidSubcategoria", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidSubcategoria"].Value = uidsubategoria; resultado = Conexion.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public bool ActualizaDireccion(string Tabla, Direccion DIR) { bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = Tabla; //Dato1 cmd.Parameters.Add("@IdDireccion", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdDireccion"].Value = DIR.ID; //Dato2 cmd.Parameters.Add("@Pais", SqlDbType.UniqueIdentifier); cmd.Parameters["@Pais"].Value = DIR.PAIS.ID; //Dato3 cmd.Parameters.Add("@IdEstado", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdEstado"].Value = DIR.ESTADO.IDESTADO; //Dato4 cmd.Parameters.Add("@IdMunicipio", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdMunicipio"].Value = DIR.MUNICIPIO.IDMUNICIPIO; //Dato5 cmd.Parameters.Add("@Ciudad", SqlDbType.UniqueIdentifier); cmd.Parameters["@Ciudad"].Value = DIR.CIUDAD.ID; //Dato6 cmd.Parameters.Add("@Calle1", SqlDbType.NVarChar, 100); cmd.Parameters["@Calle1"].Value = DIR.CALLE1; //Dato7 cmd.Parameters.Add("@Manzana", SqlDbType.NVarChar, 4); cmd.Parameters["@Manzana"].Value = DIR.MANZANA; //Dato8 cmd.Parameters.Add("@Lote", SqlDbType.NVarChar, 4); cmd.Parameters["@Lote"].Value = DIR.LOTE; //Dato9 cmd.Parameters.Add("@CodigoPostal", SqlDbType.NVarChar, 8); cmd.Parameters["@CodigoPostal"].Value = DIR.CodigoPostal; //Dato10 cmd.Parameters.Add("@Referencia", SqlDbType.NVarChar, 500); cmd.Parameters["@Referencia"].Value = DIR.REFERENCIA; //Dato 11 cmd.Parameters.Add("@Calle2", SqlDbType.NVarChar, 100); cmd.Parameters["@Calle2"].Value = DIR.CALLE2; //Dato 12 cmd.Parameters.Add("@Colonia", SqlDbType.UniqueIdentifier); cmd.Parameters["@Colonia"].Value = DIR.COLONIA.UID; //Dato 13 cmd.Parameters.Add("@Calle0", SqlDbType.NVarChar, 100); cmd.Parameters["@Calle0"].Value = DIR.CALLE0; //Dato 14 cmd.Parameters.Add("@Identificador", SqlDbType.NVarChar, 20); cmd.Parameters["@Identificador"].Value = DIR.IDENTIFICADOR; oConexion = new Conexion(); resultado = oConexion.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public bool CreaOActualiza() { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ControlTurnoRepartidor"; Comando.Parameters.Add("@UidTurnoRepartidor", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidTurnoRepartidor"].Value = UidTurno; Comando.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidUsuario"].Value = UidUsuario; oConexion = new Conexion(); resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Actualizar() { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizarMensaje"; Comando.Parameters.Add("@UidMensaje", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidMensaje"].Value = Uid; Comando.Parameters.Add("@VchMensaje", SqlDbType.NVarChar, 1000); Comando.Parameters["@VchMensaje"].Value = StrMensaje; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public void AgregarInformacionRepartidor(Guid uidUsuario, string mMonto, int MontoCOmision) { SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_AgregarInformacionRepartidor"; //Dato1 cmd.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidUsuario"].Value = uidUsuario; cmd.Parameters.Add("@MMonto", SqlDbType.Money); cmd.Parameters["@MMonto"].Value = decimal.Parse(mMonto); cmd.Parameters.Add("@IntMontoCOmision", SqlDbType.Int); cmd.Parameters["@IntMontoCOmision"].Value = MontoCOmision; oConexion = new Conexion(); //Mandar comando a ejecución oConexion.ModificarDatos(cmd); } catch (Exception) { throw; } }
public bool ActualizarComisionGoDeliverix() { bool resultado = false; try { SqlCommand Comando = new SqlCommand(); oConexion = new Conexion(); Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizaComisionGoDeliverix"; Comando.Parameters.Add("@IntValorComision", SqlDbType.Int); Comando.Parameters["@IntValorComision"].Value = int.Parse(FValor.ToString()); Comando.Parameters.Add("@StrNombreComision", SqlDbType.VarChar, 50); Comando.Parameters["@StrNombreComision"].Value = StrNombreTipoDeComision; resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool ActualizaComisionTarjeta() { bool resultado = false; try { SqlCommand Comando = new SqlCommand(); oConexion = new Conexion(); Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_ActualizaComisionPasarelaDeCobro"; Comando.Parameters.Add("@UidComision", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidComision"].Value = UidComision; Comando.Parameters.Add("@IntValor", SqlDbType.Int); Comando.Parameters["@IntValor"].Value = FValor; resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
/// <summary> /// El metodo guardar sirve para actualizar porque en el store procedure borra los registros. /// </summary> /// <returns></returns> public bool Guardar() { bool resultado = false; oConexion = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "Asp_AgregarCorreoElectronico"; Comando.Parameters.Add("@UidPropietario", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidPropietario"].Value = UidPropietario; Comando.Parameters.Add("@UidCorreoElectronico", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidCorreoElectronico"].Value = ID; Comando.Parameters.Add("@StrParametoDeInsercion", SqlDbType.VarChar, 30); Comando.Parameters["@StrParametoDeInsercion"].Value = StrParametro; Comando.Parameters.Add("@StrCorreoElectronico", SqlDbType.NVarChar, 200); Comando.Parameters["@StrCorreoElectronico"].Value = CORREO; resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Guardar(string procedure, Guid uidPropietario) { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = procedure; Comando.Parameters.Add("@UidUbicacion", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidUbicacion"].Value = UID; Comando.Parameters.Add("@uidPropietario", SqlDbType.UniqueIdentifier); Comando.Parameters["@uidPropietario"].Value = uidPropietario; Comando.Parameters.Add("@VchLatitud", SqlDbType.VarChar, 500); Comando.Parameters["@VchLatitud"].Value = VchLatitud; Comando.Parameters.Add("@VchLongiud", SqlDbType.VarChar, 500); Comando.Parameters["@VchLongiud"].Value = VchLongitud; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool GuardaEstatus(Guid UidLicencia, string Parametro, Guid UidSucursal = new Guid()) { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_BitacoraEstatusDeOrden"; if (Uidorden != Guid.Empty) { Comando.Parameters.Add("@UidOrden", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidOrden"].Value = Uidorden; } if (oMensaje.Uid != Guid.Empty && oMensaje != null) { Comando.Parameters.Add("@UidMensaje", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidMensaje"].Value = oMensaje.Uid; } if (LngFolio != 0) { Comando.Parameters.Add("@IntFolioOrden", SqlDbType.BigInt); Comando.Parameters["@IntFolioOrden"].Value = LngFolio; } if (UidSucursal != Guid.Empty) { Comando.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSucursal"].Value = UidSucursal; } if (UidLicencia != Guid.Empty) { Comando.Parameters.Add("@UidLicencia", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidLicencia"].Value = UidLicencia; } Comando.Parameters.Add("@UidEstatusEnOrden", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidEstatusEnOrden"].Value = Estatus; Comando.Parameters.Add("@Parametro", SqlDbType.Char, 1); Comando.Parameters["@Parametro"].Value = char.Parse(Parametro); resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public virtual bool ACTUALIZAREMPRESA(Empresa EMP, string TipoDeACtualizacion) { bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_actualizarDatosEmpresa"; //Dato1 cmd.Parameters.Add("@IdEmpresa", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdEmpresa"].Value = EMP.UIDEMPRESA; //Dato2 cmd.Parameters.Add("@RazonSocial", SqlDbType.NVarChar, 150); cmd.Parameters["@RazonSocial"].Value = EMP.RAZONSOCIAL; //Dato3 cmd.Parameters.Add("@NombreComercial", SqlDbType.NVarChar, 100); cmd.Parameters["@NombreComercial"].Value = EMP.NOMBRECOMERCIAL; //Dato4 cmd.Parameters.Add("@Rfc", SqlDbType.NVarChar, 30); cmd.Parameters["@Rfc"].Value = EMP.RFC; //Dato5 if (EMP.ESTATUS.ID != 0) { cmd.Parameters.Add("@Estatus", SqlDbType.Int); cmd.Parameters["@Estatus"].Value = EMP.ESTATUS.ID; } if (EMP.TIPO.ID != 0) { cmd.Parameters.Add("@TipoDeEmpresa", SqlDbType.Int); cmd.Parameters["@TipoDeEmpresa"].Value = EMP.TIPO.ID; } if (TipoDeACtualizacion == "BackSite") { cmd.Parameters.Add("@ABAbsorbe", SqlDbType.Bit); cmd.Parameters["@ABAbsorbe"].Value = Convert.ToByte(EMP.oComision.BAbsorveComision);; cmd.Parameters.Add("@IncluyeComisionTarjeta", SqlDbType.Bit); cmd.Parameters["@IncluyeComisionTarjeta"].Value = Convert.ToByte(EMP.oComision.BIncluyeComisionTarjeta); } cn = new Conexion(); //Mandar comando a ejecución resultado = cn.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
public virtual bool GUARDARSUCURSAL(Sucursal SUCURSAL) { Conexion = new Conexion(); bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_AgregaSucursal"; cmd.Parameters.Add("@Empresa", SqlDbType.UniqueIdentifier); cmd.Parameters["@Empresa"].Value = SUCURSAL.EMPRESA.UIDEMPRESA; cmd.Parameters.Add("@Sucursal", SqlDbType.UniqueIdentifier); cmd.Parameters["@Sucursal"].Value = SUCURSAL.ID; cmd.Parameters.Add("@Direccion", SqlDbType.UniqueIdentifier); cmd.Parameters["@Direccion"].Value = SUCURSAL.DIRECCION.ID; cmd.Parameters.Add("@Identificador", SqlDbType.NVarChar, 50); cmd.Parameters["@Identificador"].Value = SUCURSAL.IDENTIFICADOR; cmd.Parameters.Add("@HoraApertura", SqlDbType.NVarChar, 20); cmd.Parameters["@HoraApertura"].Value = SUCURSAL.HORAAPARTURA; cmd.Parameters.Add("@HoraCierre", SqlDbType.NVarChar, 20); cmd.Parameters["@HoraCierre"].Value = SUCURSAL.HORACIERRE; cmd.Parameters.Add("@BVisibilidadInformacion", SqlDbType.Bit); cmd.Parameters["@BVisibilidadInformacion"].Value = SUCURSAL.BVisibilidad; cmd.Parameters.Add("@Codigo", SqlDbType.VarChar, 40); cmd.Parameters["@Codigo"].Value = SUCURSAL.StrCodigo; cmd.Parameters.Add("@MFondo", SqlDbType.Money); cmd.Parameters["@MFondo"].Value = SUCURSAL.MFondo; if (SUCURSAL.Estatus.ID != 0) { cmd.Parameters.Add("@IntEstatus", SqlDbType.Int); cmd.Parameters["@IntEstatus"].Value = SUCURSAL.Estatus.ID; } resultado = Conexion.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }
//Indica que producto se asigno a la orden public bool GuardarProductos(Guid UidOrden, Guid UidProducto, int cantidad, string STRCOSTO, Guid UidSucursal, Guid UidRegistroEncarrito, Guid UidNota, string strMensaje, string UidTarifario = "") { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "Agregar_SeccionProductoEnOrden"; Comando.Parameters.Add("@UidOrden", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidOrden"].Value = UidOrden; Comando.Parameters.Add("@UidNota", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidNota"].Value = UidNota; Comando.Parameters.Add("@StrNota", SqlDbType.VarChar, 300); Comando.Parameters["@StrNota"].Value = strMensaje; Comando.Parameters.Add("@UidRegistroEnCarrito", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidRegistroEnCarrito"].Value = UidRegistroEncarrito; Comando.Parameters.Add("@UidProduto", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidProduto"].Value = UidProducto; Comando.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSucursal"].Value = UidSucursal; Comando.Parameters.Add("@IntCantidad", SqlDbType.Int); Comando.Parameters["@IntCantidad"].Value = cantidad; Comando.Parameters.Add("@MTotal", SqlDbType.Money); Comando.Parameters["@MTotal"].Value = double.Parse(STRCOSTO); Comando.Parameters.Add("@TarifarioDistribuidora", SqlDbType.VarChar, 40); Comando.Parameters["@TarifarioDistribuidora"].Value = UidTarifario; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool Guardar() { bool resultado = false; SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_AgregaVehiculo"; Comando.Parameters.Add("@UidVehiculo", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidVehiculo"].Value = UID; Comando.Parameters.Add("@UidEmpresa", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidEmpresa"].Value = UIDEmpresa; Comando.Parameters.Add("@UidTipoDeVehiculo", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidTipoDeVehiculo"].Value = UidTipoDeVehiculo; Comando.Parameters.Add("@BINumeroDeSerie", SqlDbType.VarChar, 30); Comando.Parameters["@BINumeroDeSerie"].Value = LngNumeroDeSerie; Comando.Parameters.Add("@IntCilindradaDeMotor", SqlDbType.Int); Comando.Parameters["@IntCilindradaDeMotor"].Value = IntCilindrada; Comando.Parameters.Add("@VchMarca", SqlDbType.VarChar, 30); Comando.Parameters["@VchMarca"].Value = StrMarca; Comando.Parameters.Add("@VchColor", SqlDbType.VarChar, 30); Comando.Parameters["@VchColor"].Value = StrColor; Comando.Parameters.Add("@VchModelo", SqlDbType.VarChar, 10); Comando.Parameters["@VchModelo"].Value = StrModelo; Comando.Parameters.Add("@VchAnio", SqlDbType.VarChar, 10); Comando.Parameters["@VchAnio"].Value = StrAnio; Comando.Parameters.Add("@VchNoDePlaca", SqlDbType.VarChar, 20); Comando.Parameters["@VchNoDePlaca"].Value = StrNoDePLaca; oConexion = new Conexion(); resultado = oConexion.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public bool GuardarOrden(Guid UidTarifario) { bool resultado = false; Datos = new Conexion(); SqlCommand Comando = new SqlCommand(); try { Comando.CommandType = CommandType.StoredProcedure; Comando.CommandText = "asp_Agrega_Orden"; Comando.Parameters.Add("@UidOrden", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidOrden"].Value = Uidorden; Comando.Parameters.Add("@MTotal", SqlDbType.Money); Comando.Parameters["@MTotal"].Value = MTotal; Comando.Parameters.Add("@BiCodigoDeEntrega", SqlDbType.BigInt); Comando.Parameters["@BiCodigoDeEntrega"].Value = LngCodigoDeEntrega; Comando.Parameters.Add("@MTotalSucursal", SqlDbType.Money); Comando.Parameters["@MTotalSucursal"].Value = TotalSucursal; Comando.Parameters.Add("@UidUsuario", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidUsuario"].Value = UidUsuario; Comando.Parameters.Add("@UidDireccion", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidDireccion"].Value = UidDireccion; Comando.Parameters.Add("@UidSucursal", SqlDbType.UniqueIdentifier); Comando.Parameters["@UidSucursal"].Value = UidSucursal; Comando.Parameters.Add("@RelacionDeOrden", SqlDbType.UniqueIdentifier); Comando.Parameters["@RelacionDeOrden"].Value = UidRelacionOrdenSucursal; Comando.Parameters.Add("@TarifarioDistribuidora", SqlDbType.UniqueIdentifier); Comando.Parameters["@TarifarioDistribuidora"].Value = UidTarifario; resultado = Datos.ModificarDatos(Comando); } catch (Exception) { throw; } return(resultado); }
public virtual bool GUARDAREMPRESA(Empresa EMPRESA) { bool resultado = false; SqlCommand cmd = new SqlCommand(); try { cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "asp_AgregarEmpresa"; //Dato1 cmd.Parameters.Add("@IdEmpresa", SqlDbType.UniqueIdentifier); cmd.Parameters["@IdEmpresa"].Value = EMPRESA.UIDEMPRESA; //Dato2 cmd.Parameters.Add("@RazonSocial", SqlDbType.NVarChar, 150); cmd.Parameters["@RazonSocial"].Value = EMPRESA.RAZONSOCIAL; //Dato3 cmd.Parameters.Add("@NombreComercial", SqlDbType.NVarChar, 100); cmd.Parameters["@NombreComercial"].Value = EMPRESA.NOMBRECOMERCIAL; //Dato4 cmd.Parameters.Add("@Rfc", SqlDbType.NVarChar, 30); cmd.Parameters["@Rfc"].Value = EMPRESA.RFC; //Dato5 cmd.Parameters.Add("@Estatus", SqlDbType.Int); cmd.Parameters["@Estatus"].Value = EMPRESA.ESTATUS.ID; //Dato6 cmd.Parameters.Add("@TipoDeEmpresa", SqlDbType.Int); cmd.Parameters["@TipoDeEmpresa"].Value = EMPRESA.TIPO.ID; cmd.Parameters.Add("@UidTipoDeComision", SqlDbType.UniqueIdentifier); cmd.Parameters["@UidTipoDeComision"].Value = EMPRESA.oComision.UidTipoDeComision; cmd.Parameters.Add("@ABAbsorbe", SqlDbType.Bit); cmd.Parameters["@ABAbsorbe"].Value = Convert.ToByte(EMPRESA.oComision.BAbsorveComision); cmd.Parameters.Add("@IncluyeComisionTarjeta", SqlDbType.Bit); cmd.Parameters["@IncluyeComisionTarjeta"].Value = Convert.ToByte(EMPRESA.oComision.BIncluyeComisionTarjeta); cn = new Conexion(); //Mandar comando a ejecución resultado = cn.ModificarDatos(cmd); } catch (Exception) { throw; } return(resultado); }