public override Business GetBusinessByID(int id) { DBCommands.PopulateParams("@BusinessID", id); DataTable businessTable = DBCommands.AdapterFill("p_Business_GetByID"); Business business = new Business(); try { foreach (DataRow row in businessTable.Rows) { business.AppLink = (row["AppLink"] != DBNull.Value) ? row["AppLink"].ToString() : ""; business.AppStatus = (row["AppStatus"] != DBNull.Value) ? row["AppStatus"].ToString() : ""; business.BusinessAddress = (row["BusinessAddress"] != DBNull.Value) ? row["BusinessAddress"].ToString() : ""; business.BusinessEmail = (row["BusinessEmail"] != DBNull.Value) ? row["BusinessEmail"].ToString() : ""; business.BusinessHoursEnd = (row["BusinessHoursEnd"] != DBNull.Value) ? row["BusinessHoursEnd"].ToString() : ""; business.BusinessHoursStart = (row["BusinessHoursStart"] != DBNull.Value) ? row["BusinessHoursStart"].ToString() : ""; business.BusinessID = Convert.ToInt32(row["BusinessID"]); business.BusinessName = (row["BusinessName"] != DBNull.Value) ? row["BusinessName"].ToString() : ""; business.BusinessPhone = (row["BusinessPhone"] != DBNull.Value) ? row["BusinessPhone"].ToString() : ""; business.FacebookUrl = (row["FacebookUrl"] != DBNull.Value) ? row["FacebokUrl"].ToString() : ""; business.ImageGalleryUrl = (row["ImageGalleryUrl"] != DBNull.Value) ? row["ImageGalleryUrl"].ToString() : ""; business.IsPublic = Convert.ToBoolean(row["IsPublic"] != DBNull.Value) ? Convert.ToBoolean(row["IsPublic"]) : false; business.Other = (row["Other"] != DBNull.Value) ? row["Other"].ToString() : ""; business.TypeOfBusiness = (row["TypeOfBusiness"] != DBNull.Value) ? row["TypeOfBusiness"].ToString() : ""; business.user = UserInfoGetByUser(row["UserName"].ToString()); business.WebsiteUrl = (row["WebsiteUrl"] != DBNull.Value) ? row["WebsiteUrl"].ToString() : ""; } } catch (Exception ex) { DBCommands.RecordError(ex); } return(business); }
public override DataTable FeaturesGetAll() { return(DBCommands.AdapterFill("p_Feature_GetActive")); }
public override DataTable UserGroupsGetActive() { return(DBCommands.AdapterFill("p_UserGroup_GetActive")); }
public override DataTable GroupUsersGetByUserName(string userName) { DBCommands.PopulateParams("@UserName", userName); return(DBCommands.AdapterFill("p_GroupUsers_GetByUserName")); }
public override DataTable AppRequestsGetAll() { return(DBCommands.AdapterFill("p_AppRequests_GetActive")); }
public override DataTable BusinessRequestedFeature(int businessID) { DBCommands.PopulateParams("@BusinessID", businessID); return(DBCommands.AdapterFill("p_FeatureRequested_GetByBusinessID")); }
public override DataTable BusinessGetAll() { return(DBCommands.AdapterFill("p_Business_GetActive")); }
public override DataTable UserInfoGetAll() { return(DBCommands.AdapterFill("p_UserInfo_GetAll")); }