/// <summary> /// Load GovernmentId from datarow /// </summary> /// <param name="dr"></param> /// <returns></returns> private GovernmentId LoadGovernmentId(DataRow dr) { GovernmentId governmentId = new GovernmentId(); governmentId.DocumentId = (int)dr["DocumentID"]; governmentId.DocumentType = dr["DocumentTypeNumber"].ToString(); governmentId.IdNumber = (string)dr["IdentificationNumber"]; governmentId.ExpirationDate = (DateTime)dr["ExpirationDate"]; governmentId.IssuingCountry = (string)dr["IssuingAuthority_CountryCode"]; return(governmentId); }
private void LoadGovernmentIdIntoDataTable(DataTable dt, GovernmentId govId) { if (govId != null) { DataRow dr = dt.NewRow(); dr["DocumentID"] = govId.DocumentId; dr["DocumentTypeNumber"] = Int16.Parse(govId.DocumentType); dr["IssuingAuthority_CountryCode"] = govId.IssuingCountry; dr["IdentificationNumber"] = govId.IdNumber; dr["ExpirationDate"] = govId.ExpirationDate; dt.Rows.Add(dr); } }