/// <summary> /// Envia los cambios del tlg_ZonasDataset a la base de datos. /// </summary> public static void Update(tlg_ZonasDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tlg_Zonas.Rows.Count > 0, "La tabla dataSet.tlg_ZonasDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tlg_Zonas.Update(dataSet); }
public static tlg_ZonasDataset GetList(string IdZona, string Descripcion, string Valor1, string Valor2, string Valor3) { tlg_ZonasDataset data = new tlg_ZonasDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "tlg_Zonas"); SqlCommand cmd = new SqlCommand("Pr_tlg_Zonas_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdZona", SqlDbType.VarChar)); cmd.Parameters["@IdZona"].Value = IdZona; cmd.Parameters.Add(new SqlParameter("@Descripcion", SqlDbType.VarChar)); cmd.Parameters["@Descripcion"].Value = Descripcion; cmd.Parameters.Add(new SqlParameter("@Valor1", SqlDbType.VarChar)); cmd.Parameters["@Valor1"].Value = Valor1; cmd.Parameters.Add(new SqlParameter("@Valor2", SqlDbType.VarChar)); cmd.Parameters["@Valor2"].Value = Valor2; cmd.Parameters.Add(new SqlParameter("@Valor3", SqlDbType.VarChar)); cmd.Parameters["@Valor3"].Value = Valor3; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
public static DataSet GetList([SearchParameterInfo("IdZona")] string IdZona, [SearchParameterInfo("Descripcion")] string Descripcion, [SearchParameterInfo("Valor1")] string Valor1, [SearchParameterInfo("Valor2")] string Valor2, [SearchParameterInfo("Valor3")] string Valor3 ) { tlg_ZonasDataset data = mz.erp.businessrules.tlg_Zonas.GetList(IdZona, Descripcion, Valor1, Valor2, Valor3); return(( DataSet )data); }
public static tlg_ZonasDataset.tlg_ZonasRow GetByPk(string IdZona) { tlg_ZonasDataset data = new tlg_ZonasDataset(); SqlCommand cmd = new SqlCommand("Pr_tlg_Zonas_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdZona", SqlDbType.VarChar)); cmd.Parameters["@IdZona"].Value = IdZona; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "tlg_Zonas"); adapter.Fill(data); if (data.tlg_Zonas.Rows.Count == 1) { return((tlg_ZonasDataset.tlg_ZonasRow)data.tlg_Zonas.Rows[0]); } return(null); }
public static tlg_ZonasDataset GetList() { tlg_ZonasDataset data = new tlg_ZonasDataset(); return(( tlg_ZonasDataset )GetList(data)); }
public static void Update(tlg_ZonasDataset dataSet) { Update(dataSet.tlg_Zonas); }