Exemple #1
0
 public static Designer ToDesigner(this DataRow dr)
 {
     Designer designer2 = new Designer();
     designer2.ID = dr.GetGuid("UserID");
     designer2.PayRate = dr.GetDouble("PayRate");
     designer2.FirstName = dr.GetString("FirstName");
     designer2.LastName = dr.GetString("LastName");
     designer2.CreationDate = dr.GetDate("CreationDate");
     designer2.LastEditDate = dr.GetDate("LastEditDate");
     return designer2;
 }
Exemple #2
0
 public static Designer Load(Guid id)
 {
     DbCommand cmd = SqlHelpers.CreateCommand(DataHelpers.ConnectionString, "dbo.ctx_GET_DESIGNER");
     cmd.AddInputParam("pUserID", DbType.Guid, id);
     DataTable table = cmd.ExecuteSelectTable();
     Designer designer = new Designer();
     if ((table != null) && (table.Rows.Count > 0))
     {
         designer = table.Rows[0].ToDesigner();
     }
     return designer;
 }