public bool Update(Registrations registration) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("EventId", registration.EventId); db.AddParameters("RegistrationId", registration.RegistrationId); db.AddParameters("RegistrationCode", registration.RegistrationCode); db.AddParameters("FullName", registration.FullName); db.AddParameters("Email", registration.Email); db.AddParameters("ContactNumber", registration.ContactNumber); db.AddParameters("Address", registration.Address); db.AddParameters("EventId", registration.EventId); int affectedRows = db.ExecuteNonQuery("Update_Registration", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Save(Locations location) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("LocationCode", location.LocationCode); db.AddParameters("Name", location.Name); db.AddParameters("Description", location.Description); db.AddParameters("IsActive", location.IsActive); db.AddParameters("CreatedDate", ((location.CreatedDate == null) ? location.CreatedDate : location.CreatedDate.Value)); db.AddParameters("CreatedBy", location.CreatedBy); db.AddParameters("CreatedFrom", location.CreatedFrom); db.AddParameters("UpdatedDate", ((location.UpdatedDate == null) ? location.UpdatedDate : location.UpdatedDate.Value)); db.AddParameters("UpdatedBy", location.UpdatedBy); db.AddParameters("UpdatedFrom", location.UpdatedFrom); int affectedRows = db.ExecuteNonQuery("Insert_Location", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(BlogPostCategories blogPostCategory) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("BlogPostCategoryId", blogPostCategory.BlogPostCategoryId); int affectedRows = db.ExecuteNonQuery("Delete_BlogPostCategory", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(HotelReservations hotelReservation) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("HotelId", hotelReservation.HotelId); int affectedRows = db.ExecuteNonQuery("Delete_HotelReservation", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(LenderBanks lenderBank) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("LenderBankId", lenderBank.LenderBankId); int affectedRows = db.ExecuteNonQuery("Delete_LenderBank", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(Guides guide) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("GuideId", guide.GuideId); int affectedRows = db.ExecuteNonQuery("Delete_Guide", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(Subscribes subscribe) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("EmailId", subscribe.EmailId); int affectedRows = db.ExecuteNonQuery("Delete_Email", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Delete(Registrations registration) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("RegistrationId", registration.EventId); int affectedRows = db.ExecuteNonQuery("Delete_Registration", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(HotelReservations hotelReservation) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("HotelId", hotelReservation.HotelId); db.AddParameters("HotelCode", hotelReservation.HotelCode); db.AddParameters("HotelName", hotelReservation.HotelName); db.AddParameters("ArrivalDate", hotelReservation.ArrivalDate); db.AddParameters("DepartureDate", hotelReservation.DepartureDate); db.AddParameters("RoomType", hotelReservation.RoomType); db.AddParameters("BookedBy", hotelReservation.BookedBy); db.AddParameters("Email", hotelReservation.Email); db.AddParameters("ContactNumber", hotelReservation.ContactNumber); db.AddParameters("Address", hotelReservation.Address); db.AddParameters("IsActive", hotelReservation.IsActive); db.AddParameters("CreatedDate", ((hotelReservation.CreatedDate == null) ? hotelReservation.CreatedDate : hotelReservation.CreatedDate.Value)); db.AddParameters("CreatedBy", hotelReservation.CreatedBy); db.AddParameters("CreatedFrom", hotelReservation.CreatedFrom); db.AddParameters("UpdatedDate", ((hotelReservation.UpdatedDate == null) ? hotelReservation.UpdatedDate : hotelReservation.UpdatedDate.Value)); db.AddParameters("UpdatedBy", hotelReservation.UpdatedBy); db.AddParameters("UpdatedFrom", hotelReservation.UpdatedFrom); int affectedRows = db.ExecuteNonQuery("Update_hotelReservation", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Institutes institute) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("InstituteId", institute.InstituteId); db.AddParameters("InstituteCode", institute.InstituteCode); db.AddParameters("Name", institute.Name); db.AddParameters("Logo", institute.Logo); db.AddParameters("Url", institute.Url); db.AddParameters("Description", institute.Description); db.AddParameters("SerialNumber", institute.SerialNumber); db.AddParameters("Attachment", institute.Attachment); db.AddParameters("IsActive", institute.IsActive); db.AddParameters("CreatedDate", ((institute.CreatedDate == null) ? institute.CreatedDate : institute.CreatedDate.Value)); db.AddParameters("CreatedBy", institute.CreatedBy); db.AddParameters("CreatedFrom", institute.CreatedFrom); db.AddParameters("UpdatedDate", ((institute.UpdatedDate == null) ? institute.UpdatedDate : institute.UpdatedDate.Value)); db.AddParameters("UpdatedBy", institute.UpdatedBy); db.AddParameters("UpdatedFrom", institute.UpdatedFrom); db.AddParameters("CourseId", institute.CourseId); int affectedRows = db.ExecuteNonQuery("Update_Institute", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Tutorials tutorial) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("TutorialId", tutorial.TutorialId); db.AddParameters("TutorialCode", tutorial.TutorialCode); db.AddParameters("Title", tutorial.Title); db.AddParameters("Slug", tutorial.Slug); db.AddParameters("Description", tutorial.Description); db.AddParameters("Attachment", tutorial.Attachment); db.AddParameters("ExternalUrl", tutorial.ExternalUrl); db.AddParameters("IsActive", tutorial.IsActive); db.AddParameters("CreatedDate", ((tutorial.CreatedDate == null) ? tutorial.CreatedDate : tutorial.CreatedDate.Value)); db.AddParameters("CreatedBy", tutorial.CreatedBy); db.AddParameters("CreatedFrom", tutorial.CreatedFrom); db.AddParameters("UpdatedDate", ((tutorial.UpdatedDate == null) ? tutorial.UpdatedDate : tutorial.UpdatedDate.Value)); db.AddParameters("UpdatedBy", tutorial.UpdatedBy); db.AddParameters("UpdatedFrom", tutorial.UpdatedFrom); db.AddParameters("PlayListId", tutorial.PlayListId); int affectedRows = db.ExecuteNonQuery("Update_Tutorial", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(BlogPosts blogPost) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("BlogPostId", blogPost.BlogPostId); db.AddParameters("BlogPostCode", blogPost.BlogPostCode); db.AddParameters("Title", blogPost.Title); db.AddParameters("Slag", blogPost.Slag); db.AddParameters("Description", blogPost.Description); db.AddParameters("PublishedDate", blogPost.PublishedDate); db.AddParameters("Attachment", blogPost.Attachment); db.AddParameters("IsActive", blogPost.IsActive); db.AddParameters("CreatedDate", ((blogPost.CreatedDate == null) ? blogPost.CreatedDate : blogPost.CreatedDate.Value)); db.AddParameters("CreatedBy", blogPost.CreatedBy); db.AddParameters("CreatedFrom", blogPost.CreatedFrom); db.AddParameters("UpdatedDate", ((blogPost.UpdatedDate == null) ? blogPost.UpdatedDate : blogPost.UpdatedDate.Value)); db.AddParameters("UpdatedBy", blogPost.UpdatedBy); db.AddParameters("UpdatedFrom", blogPost.UpdatedFrom); db.AddParameters("BlogPostCategoryId", blogPost.BlogPostCategoryId); int affectedRows = db.ExecuteNonQuery("Update_BlogPost", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Guides guide) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("GuideId", guide.GuideId); db.AddParameters("GuideCode", guide.GuideCode); db.AddParameters("Name", guide.Name); db.AddParameters("ContactNumber", guide.ContactNumber); db.AddParameters("Email", guide.Email); db.AddParameters("AddressLine1", guide.AddressLine1); db.AddParameters("AddressLine2", guide.AddressLine2); db.AddParameters("IsActive", guide.IsActive); db.AddParameters("CreatedDate", ((guide.CreatedDate == null) ? guide.CreatedDate : guide.CreatedDate.Value)); db.AddParameters("CreatedBy", guide.CreatedBy); db.AddParameters("CreatedFrom", guide.CreatedFrom); db.AddParameters("UpdatedDate", ((guide.UpdatedDate == null) ? guide.UpdatedDate : guide.UpdatedDate.Value)); db.AddParameters("UpdatedBy", guide.UpdatedBy); db.AddParameters("UpdatedFrom", guide.UpdatedFrom); db.AddParameters("LocationId", guide.LocationId); int affectedRows = db.ExecuteNonQuery("Update_Guide", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Users user) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("UserId", user.UserId); db.AddParameters("UserCode", user.UserCode); db.AddParameters("FullName", user.FullName); db.AddParameters("Email", user.Email); db.AddParameters("UserName", user.UserName); db.AddParameters("Password", user.Password); db.AddParameters("PasswordStamp", user.PasswordStamp); db.AddParameters("CreatedDate", ((user.CreatedDate == null) ? user.CreatedDate : user.CreatedDate.Value)); db.AddParameters("CreatedBy", user.CreatedBy); db.AddParameters("CreatedFrom", user.CreatedFrom); db.AddParameters("UpdatedDate", ((user.UpdatedDate == null) ? user.UpdatedDate : user.UpdatedDate.Value)); db.AddParameters("UpdatedBy", user.UpdatedBy); db.AddParameters("UpdatedFrom", user.UpdatedFrom); db.AddParameters("UserType", user.UserType); db.AddParameters("IsActive", user.IsActive); int affectedRows = db.ExecuteNonQuery("Update_User", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Rankings ranking) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("RankingId", ranking.RankingId); db.AddParameters("RankingCode", ranking.RankingCode); db.AddParameters("UniversityName", ranking.UniversityName); db.AddParameters("Rank", ranking.Rank); db.AddParameters("Url", ranking.Url); db.AddParameters("Description", ranking.Description); db.AddParameters("IsActive", ranking.IsActive); db.AddParameters("CreatedDate", ((ranking.CreatedDate == null) ? ranking.CreatedDate : ranking.CreatedDate.Value)); db.AddParameters("CreatedBy", ranking.CreatedBy); db.AddParameters("CreatedFrom", ranking.CreatedFrom); db.AddParameters("UpdatedDate", ((ranking.UpdatedDate == null) ? ranking.UpdatedDate : ranking.UpdatedDate.Value)); db.AddParameters("UpdatedBy", ranking.UpdatedBy); db.AddParameters("UpdatedFrom", ranking.UpdatedFrom); db.AddParameters("CountryId", ranking.CountryId); int affectedRows = db.ExecuteNonQuery("Update_Ranking", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Events evnt) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("EventId", evnt.EventId); db.AddParameters("EventCode", evnt.EventCode); db.AddParameters("Title", evnt.Title); db.AddParameters("FromDate", evnt.FromDate); db.AddParameters("ToDate", evnt.ToDate); db.AddParameters("Description", evnt.Description); db.AddParameters("IsActive", evnt.IsActive); db.AddParameters("CreatedDate", ((evnt.CreatedDate == null) ? evnt.CreatedDate : evnt.CreatedDate.Value)); db.AddParameters("CreatedBy", evnt.CreatedBy); db.AddParameters("CreatedFrom", evnt.CreatedFrom); db.AddParameters("UpdatedDate", ((evnt.UpdatedDate == null) ? evnt.UpdatedDate : evnt.UpdatedDate.Value)); db.AddParameters("UpdatedBy", evnt.UpdatedBy); db.AddParameters("UpdatedFrom", evnt.UpdatedFrom); db.AddParameters("LocationId", evnt.LocationId); int affectedRows = db.ExecuteNonQuery("Update_Event", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(Countries country) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("CountryId", country.CountryId); db.AddParameters("CountryCode", country.CountryCode); db.AddParameters("Name", country.Name); db.AddParameters("CountryCodeAlpha2", country.CountryCodeAlpha2); db.AddParameters("CountryCodeAlpha3", country.CountryCodeAlpha3); db.AddParameters("Description", country.Description); db.AddParameters("IsActive", country.IsActive); db.AddParameters("CreatedDate", ((country.CreatedDate == null) ? country.CreatedDate : country.CreatedDate.Value)); db.AddParameters("CreatedBy", country.CreatedBy); db.AddParameters("CreatedFrom", country.CreatedFrom); db.AddParameters("UpdatedDate", ((country.UpdatedDate == null) ? country.UpdatedDate : country.UpdatedDate.Value)); db.AddParameters("UpdatedBy", country.UpdatedBy); db.AddParameters("UpdatedFrom", country.UpdatedFrom); int affectedRows = db.ExecuteNonQuery("Update_Country", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Update(LenderBanks lenderBank) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("LenderBankId", lenderBank.LenderBankId); db.AddParameters("LenderBankCode", lenderBank.LenderBankCode); db.AddParameters("BankName", lenderBank.BankName); db.AddParameters("Url", lenderBank.Url); db.AddParameters("Description", lenderBank.Description); db.AddParameters("IsActive", lenderBank.IsActive); db.AddParameters("CreatedDate", ((lenderBank.CreatedDate == null) ? lenderBank.CreatedDate : lenderBank.CreatedDate.Value)); db.AddParameters("CreatedBy", lenderBank.CreatedBy); db.AddParameters("CreatedFrom", lenderBank.CreatedFrom); db.AddParameters("UpdatedDate", ((lenderBank.UpdatedDate == null) ? lenderBank.UpdatedDate : lenderBank.UpdatedDate.Value)); db.AddParameters("UpdatedBy", lenderBank.UpdatedBy); db.AddParameters("UpdatedFrom", lenderBank.UpdatedFrom); db.AddParameters("CountryId", lenderBank.CountryId); int affectedRows = db.ExecuteNonQuery("Update_LenderBank", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Save(Courses course) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("CourseCode", course.CourseCode); db.AddParameters("Name", course.Name); db.AddParameters("Description", course.Description); db.AddParameters("Attachment", course.Attachment); db.AddParameters("IsActive", course.IsActive); db.AddParameters("CreatedDate", ((course.CreatedDate == null) ? course.CreatedDate : course.CreatedDate.Value)); db.AddParameters("CreatedBy", course.CreatedBy); db.AddParameters("CreatedFrom", course.CreatedFrom); db.AddParameters("UpdatedDate", ((course.UpdatedDate == null) ? course.UpdatedDate : course.UpdatedDate.Value)); db.AddParameters("UpdatedBy", course.UpdatedBy); db.AddParameters("UpdatedFrom", course.UpdatedFrom); int affectedRows = db.ExecuteNonQuery("Insert_Course", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }
public bool Save(BlogPostCategories blogPostCategory) { QuaintDatabaseManager db = new QuaintDatabaseManager(true); try { bool flag = false; db.AddParameters("BlogPostCategoryCode", blogPostCategory.BlogPostCategoryCode); db.AddParameters("Name", blogPostCategory.Name); db.AddParameters("Slag", blogPostCategory.Slag); db.AddParameters("Description", blogPostCategory.Description); db.AddParameters("IsActive", blogPostCategory.IsActive); db.AddParameters("CreatedDate", ((blogPostCategory.CreatedDate == null) ? blogPostCategory.CreatedDate : blogPostCategory.CreatedDate.Value)); db.AddParameters("CreatedBy", blogPostCategory.CreatedBy); db.AddParameters("CreatedFrom", blogPostCategory.CreatedFrom); db.AddParameters("UpdatedDate", ((blogPostCategory.UpdatedDate == null) ? blogPostCategory.UpdatedDate : blogPostCategory.UpdatedDate.Value)); db.AddParameters("UpdatedBy", blogPostCategory.UpdatedBy); db.AddParameters("UpdatedFrom", blogPostCategory.UpdatedFrom); int affectedRows = db.ExecuteNonQuery("Insert_BlogPostCategory", true); if (affectedRows > 0) { flag = true; } return(flag); } catch (Exception) { throw; } finally { db.Disconnect(); } }