Exemplo n.º 1
0
        public static DataSet GetCentroNotInCentroCuenta(long IDCuenta)
        {
            DataSet    DS   = new DataSet();
            SqlCommand oCmd = new SqlCommand("SELECT IDCentro,Centro, Descr  FROM dbo.cntCentroCosto " +
                                             "WHERE IDCentro NOT IN(SELECT IDCentro  FROM dbo.cntCuentaCentro WHERE IDCuenta = @IDCuenta) AND Acumulador = 0", ConnectionManager.GetConnection());

            oCmd.Parameters.Add("@IDCuenta", SqlDbType.Int).Value = IDCuenta;
            SqlDataAdapter oAdap = new SqlDataAdapter(oCmd);

            oAdap.Fill(DS, "Data");
            return(DS);
        }
Exemplo n.º 2
0
        public static DataSet GetEmptyData()
        {
            DataSet        DS    = new DataSet();
            SqlCommand     oCmd  = new SqlCommand("SELECT IDCuenta,IDCentro  FROM dbo.cntCuentaCentro where 1=2 ", ConnectionManager.GetConnection());
            SqlDataAdapter oAdap = new SqlDataAdapter(oCmd);

            oAdap.Fill(DS, "Data");
            return(DS);
        }