public static tlg_TransportesDataset GetList(string IdTransporte, string Descripcion, string IdResponsable, string IdProveedor) { tlg_TransportesDataset data = new tlg_TransportesDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "tlg_Transportes"); SqlCommand cmd = new SqlCommand("Pr_tlg_Transportes_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdTransporte", SqlDbType.VarChar)); cmd.Parameters["@IdTransporte"].Value = IdTransporte; cmd.Parameters.Add(new SqlParameter("@Descripcion", SqlDbType.VarChar)); cmd.Parameters["@Descripcion"].Value = Descripcion; cmd.Parameters.Add(new SqlParameter("@IdResponsable", SqlDbType.VarChar)); cmd.Parameters["@IdResponsable"].Value = IdResponsable; cmd.Parameters.Add(new SqlParameter("@IdProveedor", SqlDbType.VarChar)); cmd.Parameters["@IdProveedor"].Value = IdProveedor; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
/// <summary> /// Envia los cambios del tlg_TransportesDataset a la base de datos. /// </summary> public static void Update(tlg_TransportesDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tlg_Transportes.Rows.Count > 0, "La tabla dataSet.tlg_TransportesDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tlg_Transportes.Update(dataSet); }
public static DataSet GetList([SearchParameterInfo("IdTransporte", IsAlternativePrimaryKey = true)] string IdTransporte, [SearchParameterInfo("Descripcion", IsDescription = true)] string Descripcion, [SearchParameterInfo("IdResponsable")] string IdResponsable, [SearchParameterInfo("IdProveedor")] string IdProveedor ) { tlg_TransportesDataset data = mz.erp.businessrules.tlg_Transportes.GetList(IdTransporte, Descripcion, IdResponsable, IdProveedor); return(( DataSet )data); }
public static tlg_TransportesDataset.tlg_TransportesRow GetByPk(string IdTransporte) { tlg_TransportesDataset data = new tlg_TransportesDataset(); SqlCommand cmd = new SqlCommand("Pr_tlg_Transportes_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdTransporte", SqlDbType.VarChar)); cmd.Parameters["@IdTransporte"].Value = IdTransporte; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "tlg_Transportes"); adapter.Fill(data); if (data.tlg_Transportes.Rows.Count == 1) { return((tlg_TransportesDataset.tlg_TransportesRow)data.tlg_Transportes.Rows[0]); } return(null); }
public static tlg_TransportesDataset GetList() { tlg_TransportesDataset data = new tlg_TransportesDataset(); return(( tlg_TransportesDataset )GetList(data)); }
public static void Update(tlg_TransportesDataset dataSet) { Update(dataSet.tlg_Transportes); }