Пример #1
0
        public static DataRow GetByIdTipoDeComprobante(string IdTipoDeComprobante)
        {
            tsy_AfipTiposDeComprobantesDataset.tsy_AfipTiposDeComprobantesDataTable data = new tsy_AfipTiposDeComprobantesDataset().tsy_AfipTiposDeComprobantes;

            SqlDataAdapter adapter = new SqlDataAdapter();

            adapter.TableMappings.Add("Table", "tsy_AfipTiposDeComprobantes");

            SqlCommand cmd = new SqlCommand("Pr_tsy_AfipTiposDeComprobantes_SearchByIdTipoDeComprobante", dbhelper.Connection.GetConnection());

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("@IdTipoDeComprobante", SqlDbType.VarChar));
            cmd.Parameters["@IdTipoDeComprobante"].Value = IdTipoDeComprobante;
            adapter.SelectCommand = cmd;

            adapter.Fill(data);

            if (data.Rows.Count > 0)
            {
                return(data.Rows[0]);
            }

            return(null);
        }
        /// <summary>
        /// Envia los cambios del tsy_AfipTiposDeComprobantesDataset a la base de datos.
        /// </summary>
        public static void Update(tsy_AfipTiposDeComprobantesDataset dataSet)
        {
            ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber);
            ApplicationAssert.Check(dataSet.tsy_AfipTiposDeComprobantes.Rows.Count > 0, "La tabla dataSet.tsy_AfipTiposDeComprobantesDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tsy_AfipTiposDeComprobantes.Update(dataSet);
        }
Пример #3
0
        public static tsy_AfipTiposDeComprobantesDataset GetList(string Codigo, string Descripcion)
        {
            tsy_AfipTiposDeComprobantesDataset data = new tsy_AfipTiposDeComprobantesDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

            adapter.TableMappings.Add("Table", "tsy_AfipTiposDeComprobantes");

            SqlCommand cmd = new SqlCommand("Pr_tsy_AfipTiposDeComprobantes_Search", dbhelper.Connection.GetConnection());

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("@Codigo", SqlDbType.VarChar));
            cmd.Parameters["@Codigo"].Value = Codigo;
            cmd.Parameters.Add(new SqlParameter("@Descripcion", SqlDbType.VarChar));
            cmd.Parameters["@Descripcion"].Value = Descripcion;
            adapter.SelectCommand = cmd;

            adapter.Fill(data);

            return(data);
        }
Пример #4
0
        public static tsy_AfipTiposDeComprobantesDataset.tsy_AfipTiposDeComprobantesRow GetByPk(string Codigo)
        {
            tsy_AfipTiposDeComprobantesDataset data = new tsy_AfipTiposDeComprobantesDataset();

            SqlCommand cmd = new SqlCommand("Pr_tsy_AfipTiposDeComprobantes_GetByPk", dbhelper.Connection.GetConnection());

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("@Codigo", SqlDbType.VarChar));
            cmd.Parameters["@Codigo"].Value = Codigo;

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            adapter.TableMappings.Add("Table", "tsy_AfipTiposDeComprobantes");

            adapter.Fill(data);

            if (data.tsy_AfipTiposDeComprobantes.Rows.Count == 1)
            {
                return((tsy_AfipTiposDeComprobantesDataset.tsy_AfipTiposDeComprobantesRow)data.tsy_AfipTiposDeComprobantes.Rows[0]);
            }

            return(null);
        }
Пример #5
0
        public static tsy_AfipTiposDeComprobantesDataset GetList()
        {
            tsy_AfipTiposDeComprobantesDataset data = new tsy_AfipTiposDeComprobantesDataset();

            return(( tsy_AfipTiposDeComprobantesDataset )GetList(data));
        }
Пример #6
0
 public static void Update(tsy_AfipTiposDeComprobantesDataset dataSet)
 {
     Update(dataSet.tsy_AfipTiposDeComprobantes);
 }