예제 #1
0
    public static TMSEvolutionOfGeneralAwarnessDetails Get(System.Int64 egadAwarnessId)
    {
        DataSet   ds;
        Database  db;
        string    sqlCommand;
        DbCommand dbCommand;
        TMSEvolutionOfGeneralAwarnessDetails instance;


        instance = new TMSEvolutionOfGeneralAwarnessDetails();

        db         = DatabaseFactory.CreateDatabase();
        sqlCommand = "[dbo].gspTMSEvolutionOfGeneralAwarnessDetails_SELECT";
        dbCommand  = db.GetStoredProcCommand(sqlCommand, egadAwarnessId);

        // Get results.
        ds = db.ExecuteDataSet(dbCommand);
        // Verification.
        if (ds == null || ds.Tables[0].Rows.Count == 0)
        {
            throw new ApplicationException("Could not get TMSEvolutionOfGeneralAwarnessDetails ID:" + egadAwarnessId.ToString() + " from Database.");
        }
        // Return results.
        ds.Tables[0].TableName = TABLE_NAME;

        instance.MapFrom(ds.Tables[0].Rows[0]);
        return(instance);
    }
예제 #2
0
    public static TMSEvolutionOfGeneralAwarnessDetails[] Search(System.Int64?egadAwarnessId, System.Int64?egadSchoolId, System.Int64?egadSchoolSubId, System.Int64?egadStudentLoginId, System.String egadMySurrounding, System.String egadMyMotherName, System.String egadMyFatherName, System.String egadMyHomeAddress, System.String egadMyPhoneNumber, System.String egadMySchoolName, System.String egadAddedByType, System.Int64?egadAddedByLoginId, System.DateTime?egadDate, System.Int32?egadStatus)
    {
        DataSet   ds;
        Database  db;
        string    sqlCommand;
        DbCommand dbCommand;


        db         = DatabaseFactory.CreateDatabase();
        sqlCommand = "[dbo].gspTMSEvolutionOfGeneralAwarnessDetails_SEARCH";
        dbCommand  = db.GetStoredProcCommand(sqlCommand, egadAwarnessId, egadSchoolId, egadSchoolSubId, egadStudentLoginId, egadMySurrounding, egadMyMotherName, egadMyFatherName, egadMyHomeAddress, egadMyPhoneNumber, egadMySchoolName, egadAddedByType, egadAddedByLoginId, egadDate, egadStatus);

        ds = db.ExecuteDataSet(dbCommand);
        ds.Tables[0].TableName = TABLE_NAME;
        return(TMSEvolutionOfGeneralAwarnessDetails.MapFrom(ds));
    }
예제 #3
0
    public static TMSEvolutionOfGeneralAwarnessDetails[] MapFrom(DataSet ds)
    {
        List <TMSEvolutionOfGeneralAwarnessDetails> objects;


        // Initialise Collection.
        objects = new List <TMSEvolutionOfGeneralAwarnessDetails>();

        // Validation.
        if (ds == null)
        {
            throw new ApplicationException("Cannot map to dataset null.");
        }
        else if (ds.Tables[TABLE_NAME].Rows.Count == 0)
        {
            return(objects.ToArray());
        }

        if (ds.Tables[TABLE_NAME] == null)
        {
            throw new ApplicationException("Cannot find table [dbo].[TMS_EvolutionOfGeneralAwarnessDetails] in DataSet.");
        }

        if (ds.Tables[TABLE_NAME].Rows.Count < 1)
        {
            throw new ApplicationException("Table [dbo].[TMS_EvolutionOfGeneralAwarnessDetails] is empty.");
        }

        // Map DataSet to Instance.
        foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows)
        {
            TMSEvolutionOfGeneralAwarnessDetails instance = new TMSEvolutionOfGeneralAwarnessDetails();
            instance.MapFrom(dr);
            objects.Add(instance);
        }

        // Return collection.
        return(objects.ToArray());
    }
예제 #4
0
 public static TMSEvolutionOfGeneralAwarnessDetails[] Search(TMSEvolutionOfGeneralAwarnessDetails searchObject)
 {
     return(Search(searchObject.EGADAwarnessId, searchObject.EGADSchoolId, searchObject.EGADSchoolSubId, searchObject.EGADStudentLoginId, searchObject.EGADMySurrounding, searchObject.EGADMyMotherName, searchObject.EGADMyFatherName, searchObject.EGADMyHomeAddress, searchObject.EGADMyPhoneNumber, searchObject.EGADMySchoolName, searchObject.EGADAddedByType, searchObject.EGADAddedByLoginId, searchObject.EGADDate, searchObject.EGADStatus));
 }
예제 #5
0
 public static void Update(TMSEvolutionOfGeneralAwarnessDetails tMSEvolutionOfGeneralAwarnessDetails, DbTransaction transaction)
 {
     tMSEvolutionOfGeneralAwarnessDetails.Update(transaction);
 }
예제 #6
0
 public static void Update(TMSEvolutionOfGeneralAwarnessDetails tMSEvolutionOfGeneralAwarnessDetails)
 {
     tMSEvolutionOfGeneralAwarnessDetails.Update();
 }
 public static DataSet GetSearch(TMSEvolutionOfGeneralAwarnessDetails searchObject)
 {
     return GetSearch(searchObject.EGADAwarnessId, searchObject.EGADSchoolId, searchObject.EGADSchoolSubId, searchObject.EGADStudentLoginId, searchObject.EGADMySurrounding, searchObject.EGADMyMotherName, searchObject.EGADMyFatherName, searchObject.EGADMyHomeAddress, searchObject.EGADMyPhoneNumber, searchObject.EGADMySchoolName, searchObject.EGADAddedByType, searchObject.EGADAddedByLoginId, searchObject.EGADDate, searchObject.EGADStatus);
 }
 public static void Update(TMSEvolutionOfGeneralAwarnessDetails tMSEvolutionOfGeneralAwarnessDetails, DbTransaction transaction)
 {
     tMSEvolutionOfGeneralAwarnessDetails.Update(transaction);
 }
 public static void Update(TMSEvolutionOfGeneralAwarnessDetails tMSEvolutionOfGeneralAwarnessDetails)
 {
     tMSEvolutionOfGeneralAwarnessDetails.Update();
 }
    public static TMSEvolutionOfGeneralAwarnessDetails[] MapFrom(DataSet ds)
    {
        List<TMSEvolutionOfGeneralAwarnessDetails> objects;

        // Initialise Collection.
        objects = new List<TMSEvolutionOfGeneralAwarnessDetails>();

        // Validation.
        if (ds == null)
        throw new ApplicationException("Cannot map to dataset null.");
        else if (ds.Tables[TABLE_NAME].Rows.Count == 0)
        return objects.ToArray();

        if (ds.Tables[TABLE_NAME] == null)
        throw new ApplicationException("Cannot find table [dbo].[TMS_EvolutionOfGeneralAwarnessDetails] in DataSet.");

        if (ds.Tables[TABLE_NAME].Rows.Count < 1)
        throw new ApplicationException("Table [dbo].[TMS_EvolutionOfGeneralAwarnessDetails] is empty.");

        // Map DataSet to Instance.
        foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows)
        {
            TMSEvolutionOfGeneralAwarnessDetails instance = new TMSEvolutionOfGeneralAwarnessDetails();
            instance.MapFrom(dr);
            objects.Add(instance);
        }

        // Return collection.
        return objects.ToArray();
    }
    public static TMSEvolutionOfGeneralAwarnessDetails Get(System.Int64 egadAwarnessId)
    {
        DataSet ds;
        Database db;
        string sqlCommand;
        DbCommand dbCommand;
        TMSEvolutionOfGeneralAwarnessDetails instance;

        instance = new TMSEvolutionOfGeneralAwarnessDetails();

        db = DatabaseFactory.CreateDatabase();
        sqlCommand = "[dbo].gspTMSEvolutionOfGeneralAwarnessDetails_SELECT";
        dbCommand = db.GetStoredProcCommand(sqlCommand, egadAwarnessId);

        // Get results.
        ds = db.ExecuteDataSet(dbCommand);
        // Verification.
        if (ds == null || ds.Tables[0].Rows.Count == 0) throw new ApplicationException("Could not get TMSEvolutionOfGeneralAwarnessDetails ID:" + egadAwarnessId.ToString()+ " from Database.");
        // Return results.
        ds.Tables[0].TableName = TABLE_NAME;

        instance.MapFrom( ds.Tables[0].Rows[0] );
        return instance;
    }