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

            return(( tlg_TransportesDataset )GetList(data));
        }
コード例 #6
0
 public static void Update(tlg_TransportesDataset dataSet)
 {
     Update(dataSet.tlg_Transportes);
 }