public static TMSFeesInstallment Get(System.Int64 fiInstallmentId)
    {
        DataSet            ds;
        Database           db;
        string             sqlCommand;
        DbCommand          dbCommand;
        TMSFeesInstallment instance;


        instance = new TMSFeesInstallment();

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

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

        instance.MapFrom(ds.Tables[0].Rows[0]);
        return(instance);
    }
    public static TMSFeesInstallment[] Search(System.Int64?fiInstallmentId, System.Int64?fiStudentLoginId, System.Int64?fiSchoolId, System.Int64?fiSchoolSubId, System.Int64?fiPaymentId, System.String fiInstallmentType, System.String fiAmount, System.String fiInstallmentStatus, System.DateTime?fiLastDate, System.String fiLateFeesPerDay, System.String fiTotalFees, System.DateTime?fiDate, System.Int32?fiStatus)
    {
        DataSet   ds;
        Database  db;
        string    sqlCommand;
        DbCommand dbCommand;


        db         = DatabaseFactory.CreateDatabase();
        sqlCommand = "[dbo].gspTMSFeesInstallment_SEARCH";
        dbCommand  = db.GetStoredProcCommand(sqlCommand, fiInstallmentId, fiStudentLoginId, fiSchoolId, fiSchoolSubId, fiPaymentId, fiInstallmentType, fiAmount, fiInstallmentStatus, fiLastDate, fiLateFeesPerDay, fiTotalFees, fiDate, fiStatus);

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


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

        // 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_FeesInstallment] in DataSet.");
        }

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

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

        // Return collection.
        return(objects.ToArray());
    }
 public static void Update(TMSFeesInstallment tMSFeesInstallment, DbTransaction transaction)
 {
     tMSFeesInstallment.Update(transaction);
 }
 public static void Update(TMSFeesInstallment tMSFeesInstallment)
 {
     tMSFeesInstallment.Update();
 }
 public static TMSFeesInstallment[] Search(TMSFeesInstallment searchObject)
 {
     return Search ( searchObject.FIInstallmentId, searchObject.FIStudentLoginId, searchObject.FISchoolId, searchObject.FISchoolSubId, searchObject.FIPaymentId, searchObject.FIInstallmentType, searchObject.FIAmount, searchObject.FIInstallmentStatus, searchObject.FILastDate, searchObject.FILateFeesPerDay, searchObject.FITotalFees, searchObject.FIDate, searchObject.FIStatus);
 }
    public static TMSFeesInstallment[] MapFrom(DataSet ds)
    {
        List<TMSFeesInstallment> objects;

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

        // 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_FeesInstallment] in DataSet.");

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

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

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

        instance = new TMSFeesInstallment();

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

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

        instance.MapFrom( ds.Tables[0].Rows[0] );
        return instance;
    }
 public static TMSFeesInstallment[] Search(TMSFeesInstallment searchObject)
 {
     return(Search(searchObject.FIInstallmentId, searchObject.FIStudentLoginId, searchObject.FISchoolId, searchObject.FISchoolSubId, searchObject.FIPaymentId, searchObject.FIInstallmentType, searchObject.FIAmount, searchObject.FIInstallmentStatus, searchObject.FILastDate, searchObject.FILateFeesPerDay, searchObject.FITotalFees, searchObject.FIDate, searchObject.FIStatus));
 }
 public static void Update(TMSFeesInstallment tMSFeesInstallment, DbTransaction transaction)
 {
     tMSFeesInstallment.Update(transaction);
 }
 public static void Update(TMSFeesInstallment tMSFeesInstallment)
 {
     tMSFeesInstallment.Update();
 }