Guest User

Untitled

a guest
Jul 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. public ChildInfo GetScreenData(string pCert, string pScreen)
  2. {
  3. DataSet dataSet = _WCFClient.Get_Screen_Data(pCert, pScreen);
  4.  
  5. ChildInfo childinfo = (from c in dataSet.Tables[0]
  6. select new ChildInfo()
  7. {
  8.  
  9. FirstName = c[0] == DBNull.Value ? "" : c[0].ToString(),
  10. MiddleName = c[1] == DBNull.Value ? "" : c[1].ToString(),
  11. LastName = c[2] == DBNull.Value ? "" : c[2].ToString(),
  12. Suffix = c[3] == DBNull.Value ? "" : c[3].ToString(),
  13. ChildNotNamed = c[4] == DBNull.Value ? false : (bool)c[4],
  14. Sex = c[5] == DBNull.Value ? "" : c[5].ToString(),
  15. DOB = c[6] == DBNull.Value ? "" : c[6].ToString(),
  16. Hour = c[7] == DBNull.Value ? "" : c[7].ToString(),
  17. Minute = c[7] == DBNull.Value ? "" : c[7].ToString(),
  18. CountryBirth = c[9] == DBNull.Value ? "" : c[9].ToString(),
  19. CityBirth = c[10] == DBNull.Value ? "" : c[10].ToString()
  20.  
  21. });
  22.  
  23.  
  24.  
  25. return childinfo;
  26. }
Add Comment
Please, Sign In to add comment