Exemple #1
0
 public AMSRequest[] FormatAMSRequest(DataTable dt)
 {
     AMSRequest[] _list = new AMSRequest[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         _list[i] = FormatAMSRequest(dt.Rows[i]);
     }
     return(_list);
 }
Exemple #2
0
        AMSRequest FormatAMSRequest(DataRow row)
        {
            AMSRequest entry = new AMSRequest();

            entry.RequestID        = row["RequestID"].ToString();
            entry.Category         = row["Category"].ToString();
            entry.IONumber         = row["IONumber"].ToString();
            entry.IOSubject        = row["IOSubject"].ToString();
            entry.IODes            = row["IODes"].ToString();
            entry.AMSNumber        = row["AMSNumber"].ToString();
            entry.TA               = row["TA"].ToString();
            entry.InitiatedBy      = row["InitiatedBy"].ToString();
            entry.InsititutionType = row["InsititutionType"].ToString();
            entry.InsititutionName = row["InsititutionName"].ToString();
            entry.JustifiedBusinessSelectionCriteria = row["JustifiedBusinessSelectionCriteria"].ToString();
            entry.Status     = row["Status"].ToString();
            entry.CreateTime = string.IsNullOrEmpty(row["CreateTime"].ToString()) ? DateTime.MinValue : DateTime.Parse(row["CreateTime"].ToString());
            entry.CreatedBy  = row["CreatedBy"].ToString();
            entry.UpdateTime = string.IsNullOrEmpty(row["UpdateTime"].ToString()) ? DateTime.MinValue : DateTime.Parse(row["UpdateTime"].ToString());
            entry.UpdatedBy  = row["UpdatedBy"].ToString();
            return(entry);
        }