public static void Update(TMSStudentDetails tMSStudentDetails, DbTransaction transaction) { tMSStudentDetails.Update(transaction); }
public static void Update(TMSStudentDetails tMSStudentDetails) { tMSStudentDetails.Update(); }
public static TMSStudentDetails[] MapFrom(DataSet ds) { List<TMSStudentDetails> objects; // Initialise Collection. objects = new List<TMSStudentDetails>(); // 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_StudentDetails] in DataSet."); if (ds.Tables[TABLE_NAME].Rows.Count < 1) throw new ApplicationException("Table [dbo].[TMS_StudentDetails] is empty."); // Map DataSet to Instance. foreach (DataRow dr in ds.Tables[TABLE_NAME].Rows) { TMSStudentDetails instance = new TMSStudentDetails(); instance.MapFrom(dr); objects.Add(instance); } // Return collection. return objects.ToArray(); }
public static TMSStudentDetails[] Search(TMSStudentDetails searchObject) { return Search(searchObject.SDStudentDetailsId, searchObject.SDApplicationId, searchObject.SDLoginId, searchObject.SDParentId, searchObject.SDStudentPNRId, searchObject.SDStudentClassId, searchObject.SDFormNo, searchObject.SDFirstName, searchObject.SDMiddleName, searchObject.SDLastName, searchObject.SDDateOfBirth, searchObject.SDPlaceOfBirth, searchObject.SDAcadamicYear, searchObject.SDBloodGroup, searchObject.SDStudentImage, searchObject.SDNationality, searchObject.SDGender, searchObject.SDCaste, searchObject.SDSubCaste, searchObject.SDDateOfAdmission, searchObject.SDMotherTongue, searchObject.SDSchoolCategoryId, searchObject.SDSchoolSubCatId, searchObject.SDTransportStatus, searchObject.SDMedicalProblem, searchObject.SDLastSchoolAttended, searchObject.SDLastClassAttended, searchObject.SDLastClassPer, searchObject.SDAddressId, searchObject.SDAgeProof, searchObject.SDLastProgressReportCard, searchObject.SDOriginalSchoolLC, searchObject.SDPassportAndVisa, searchObject.SDRegistrationLetter, searchObject.SDStatus); }
public static TMSStudentDetails Get(System.Int64 sdStudentDetailsId) { DataSet ds; Database db; string sqlCommand; DbCommand dbCommand; TMSStudentDetails instance; instance = new TMSStudentDetails(); db = DatabaseFactory.CreateDatabase(); sqlCommand = "[dbo].gspTMSStudentDetails_SELECT"; dbCommand = db.GetStoredProcCommand(sqlCommand, sdStudentDetailsId); // Get results. ds = db.ExecuteDataSet(dbCommand); // Verification. if (ds == null || ds.Tables[0].Rows.Count == 0) throw new ApplicationException("Could not get TMSStudentDetails ID:" + sdStudentDetailsId.ToString() + " from Database."); // Return results. ds.Tables[0].TableName = TABLE_NAME; instance.MapFrom(ds.Tables[0].Rows[0]); return instance; }