Paste "GeneratareInfoTable" Text
  1. private static string GeneratareInfoTable(string fullname, string tc, string tel, string email, string birthday, string note)
  2. {
  3. const string th = "style='background-color: #00707B;border: 1px solid #086670;color: #ECECEC;padding: 5px;text-align: left;'";
  4. const string td = "class='column' style='border: 1px solid #ECECEC;padding: 5px;'";
  5.  
  6. var str = new StringBuilder();
  7. str.Append("<table id='table' cellpadding='0' cellspacing='0' style='border: 1px solid #ECECEC;width: 100%;'>");
  8. str.Append("<tbody><tr>");
  9. str.Append(string.Format("<tr><td class='table-title' {1}>Adı Soyadı</td><td {2}>{0}</td></tr>", fullname, th, td));
  10. str.Append(string.Format("<tr><td class='table-title' {1}>TC Kimlik Numarası</td><td {2}>{0}</td></tr>", tc, th, td));
  11. str.Append(string.Format("<tr><td class='table-title' {1}>Telefon</td><td {2}>{0}</td></tr>", tel, th, td));
  12. str.Append(string.Format("<tr><td class='table-title' {1}>E-Posta</td><td {2}>{0}</td></tr>", email, th, td));
  13. str.Append(string.Format("<tr><td class='table-title' {1}>Doğum Tarihi</td><td {2}>{0}</td></tr>", !string.IsNullOrEmpty(birthday.Trim()) ? DateTime.Parse(birthday).ToString(Settings.Default.DateFormatWeb) : birthday, th, td));
  14. str.Append(string.Format("<tr><td class='table-title' {1}>Not</td><td {2}>{0}</td></tr>", note, th, td));
  15. str.Append("</tr></tbody></table>");
  16. return str.ToString();
  17. }
Submitted and never expires    Report abuse
2KB Characters: 1559 Hits: 169