public static string GetMemberId(string id) { string selectText = "MessageBoardId = '" + id + "'"; MemberID = id; const string i = ","; DataRow rw = tc.SelectDataById(selectText); var MBId = rw[0].ToString(); var author = rw[1].ToString(); var title = rw[2].ToString(); var content = rw[3].ToString(); var linkURL = rw[4].ToString(); var categroies = rw[6].ToString(); StringBuilder sb = new StringBuilder(); sb.Append(MBId + i); sb.Append(author + i); sb.Append(title + i); sb.Append(content + i); sb.Append(linkURL + i); sb.Append(categroies + i); return(sb.ToString()); }
public static string GetMemberId(int id) { string selectText = "Id = '" + id + "'"; memberId = id; DataRow rw = tc.SelectDataById(selectText); string userId = rw[0].ToString(); string loginId = rw[1].ToString(); string name = rw[2].ToString(); string address = rw[3].ToString(); string phone = rw[4].ToString(); string mail = rw[5].ToString(); string role = rw[6].ToString(); string personalSynopsis = rw[9].ToString(); string i = ","; StringBuilder sb = new StringBuilder(); sb.Append(userId + i); sb.Append(loginId + i); sb.Append(name + i); sb.Append(address + i); sb.Append(phone + i); sb.Append(mail + i); sb.Append(role + i); sb.Append(personalSynopsis); return(sb.ToString()); }