public List <Following> Find_Followers_Names(string following_id) { List <Following> followersList = null; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@Following_id", following_id) }; using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("Find_Followers_Names", CommandType.StoredProcedure, parameters)) { if (table.Rows.Count > 0) { followersList = new List <Following>(); foreach (DataRow row in table.Rows) { Following following = new Following(); following.User_id = row["user_id"].ToString(); following.FullName = row["fullName"].ToString(); following.ProfilePic = (bool)row["profilepic"]; if (following.ProfilePic == true) { following.ProfilepicUrl = "~/ProfilePic/" + following.User_id + ".jpg"; } else { following.ProfilepicUrl = "~/ProfilePic/default.png"; } following.User_idShow = "(@" + following.User_id + ")"; followersList.Add(following); } } } return(followersList); }
public bool Following_Delete(Following following) { return(followingDb.Following_Delete(following)); }
public bool Following_Add(Following following) { return(followingDb.Following_Add(following)); }