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


        instance = new TMSLibrarianDetails();

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

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

        instance.MapFrom(ds.Tables[0].Rows[0]);
        return(instance);
    }
    public static TMSLibrarianDetails[] Search(System.Int64?lbId, System.Int64?lbLoginID, System.Int64?lbUsertype, System.String lbFirstName, System.String lbMiddleName, System.String lbLastName, System.String lbPhoto, System.DateTime?lbDob, System.String lbCaste, System.String lbSubCaste, System.String lbBirthPlace, System.String lbGender, System.String lbBloodGroup, System.String lbMotherTongue, System.DateTime?lbDoj, System.String lbHighestDegree, System.String lbCompletedYear, System.String lbUniversity, System.Int64?lbAddressId, System.String lbAgeproof, System.String lbReleavingLetter, System.String lbResume, System.Int32?lbStatus)
    {
        DataSet   ds;
        Database  db;
        string    sqlCommand;
        DbCommand dbCommand;


        db         = DatabaseFactory.CreateDatabase();
        sqlCommand = "[dbo].gspTMSLibrarianDetails_SEARCH";
        dbCommand  = db.GetStoredProcCommand(sqlCommand, lbId, lbLoginID, lbUsertype, lbFirstName, lbMiddleName, lbLastName, lbPhoto, lbDob, lbCaste, lbSubCaste, lbBirthPlace, lbGender, lbBloodGroup, lbMotherTongue, lbDoj, lbHighestDegree, lbCompletedYear, lbUniversity, lbAddressId, lbAgeproof, lbReleavingLetter, lbResume, lbStatus);

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


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

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

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

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

        // Return collection.
        return(objects.ToArray());
    }
 public static void Update(TMSLibrarianDetails tMSLibrarianDetails, DbTransaction transaction)
 {
     tMSLibrarianDetails.Update(transaction);
 }
 public static void Update(TMSLibrarianDetails tMSLibrarianDetails)
 {
     tMSLibrarianDetails.Update();
 }
 public static TMSLibrarianDetails[] Search(TMSLibrarianDetails searchObject)
 {
     return Search ( searchObject.LbId, searchObject.LBLoginID, searchObject.LBUsertype, searchObject.LBFirstName, searchObject.LBMiddleName, searchObject.LBLastName, searchObject.LBPhoto, searchObject.LbDob, searchObject.LBCaste, searchObject.LBSubCaste, searchObject.LBBirthPlace, searchObject.LBGender, searchObject.LBBloodGroup, searchObject.LBMotherTongue, searchObject.LbDoj, searchObject.LBHighestDegree, searchObject.LBCompletedYear, searchObject.LBUniversity, searchObject.LBAddressId, searchObject.LBAgeproof, searchObject.LBReleavingLetter, searchObject.LBResume, searchObject.LBStatus);
 }
    public static TMSLibrarianDetails[] MapFrom(DataSet ds)
    {
        List<TMSLibrarianDetails> objects;

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

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

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

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

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

        instance = new TMSLibrarianDetails();

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

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

        instance.MapFrom( ds.Tables[0].Rows[0] );
        return instance;
    }
 public static TMSLibrarianDetails[] Search(TMSLibrarianDetails searchObject)
 {
     return(Search(searchObject.LbId, searchObject.LBLoginID, searchObject.LBUsertype, searchObject.LBFirstName, searchObject.LBMiddleName, searchObject.LBLastName, searchObject.LBPhoto, searchObject.LbDob, searchObject.LBCaste, searchObject.LBSubCaste, searchObject.LBBirthPlace, searchObject.LBGender, searchObject.LBBloodGroup, searchObject.LBMotherTongue, searchObject.LbDoj, searchObject.LBHighestDegree, searchObject.LBCompletedYear, searchObject.LBUniversity, searchObject.LBAddressId, searchObject.LBAgeproof, searchObject.LBReleavingLetter, searchObject.LBResume, searchObject.LBStatus));
 }
 public static void Update(TMSLibrarianDetails tMSLibrarianDetails, DbTransaction transaction)
 {
     tMSLibrarianDetails.Update(transaction);
 }
 public static void Update(TMSLibrarianDetails tMSLibrarianDetails)
 {
     tMSLibrarianDetails.Update();
 }