示例#1
0
        /// <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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        public static tlg_ZonasDataset GetList()
        {
            tlg_ZonasDataset data = new tlg_ZonasDataset();

            return(( tlg_ZonasDataset )GetList(data));
        }
示例#6
0
 public static void Update(tlg_ZonasDataset dataSet)
 {
     Update(dataSet.tlg_Zonas);
 }