예제 #1
0
        protected override void DataToModel(Client item, DataRow row)
        {
            item.Id        = (int)row[0];
            item.Name      = (string)row[1];
            item.Surname   = (string)row[2];
            item.AddressId = (int)row[3];

            //item.Address = addressServiceHandler.GetList().First();     // TODO : apply filter
            if (item.AddressId != 0)
            {
                item.Address = addressServiceHandler.FromKey(item.AddressId);
            }

            item.Email = (string)row[4];
        }
예제 #2
0
 protected override void DataToModel(Project item, DataRow row)
 {
     item.Id         = (int)row[0];
     item.Name       = (string)row[1];
     item.Price      = (float)row[2];
     item.StartDate  = (DateTime)row[3];
     item.EndDate    = (DateTime)row[4];
     item.StatusKey  = (int)row[5];
     item.Status     = projectStatusServiceHandler.FromKey(item.StatusKey);
     item.AddressKey = (int)row[6];
     if (item.AddressKey != 0)
     {
         item.Address = addressServiceHandler.FromKey(item.AddressKey);
     }
     item.Receivable      = (string)row[7];
     item.AgeOfReceivable = (string)row[8];
     item.ClientId        = (int)row[9];
     //if (item.ClientKey != 0)
     //    item.Client = clientServiceHandler.FromKey(item.ClientKey);
 }