Пример #1
0
        public void DTO2DB_QuickDocumentClient(DTO.DocumentClientMng.DocumentClientSearchUpdate dtoItem, ref DocumentClient dbItem)
        {
            AutoMapper.Mapper.Map <DTO.DocumentClientMng.DocumentClientSearchUpdate, DocumentClient>(dtoItem, dbItem);

            dbItem.DateEmailToClient = dtoItem.DateEmailToClientFormated.ConvertStringToDateTime();
            dbItem.DateSendToClient  = dtoItem.DateSendToClientFormated.ConvertStringToDateTime();
            if (dbItem.IsConfirmedDateContainerDelivery == null || (bool)dbItem.IsConfirmedDateContainerDelivery == false)
            {
                dbItem.DateContainerDelivery = dtoItem.DateContainerDeliveryFormated.ConvertStringToDateTime();
            }
        }
Пример #2
0
        public void DTO2DB_DocumentClient(DTO.DocumentClientMng.DocumentClient dtoItem, ref DocumentClient dbItem)
        {
            AutoMapper.Mapper.Map <DTO.DocumentClientMng.DocumentClient, DocumentClient>(dtoItem, dbItem);

            dbItem.DateEmailToClient = dtoItem.DateEmailToClientFormated.ConvertStringToDateTime();
            dbItem.DateSendToClient  = dtoItem.DateSendToClientFormated.ConvertStringToDateTime();
            if (dbItem.IsConfirmedDateContainerDelivery == null || (bool)dbItem.IsConfirmedDateContainerDelivery == false)
            {
                dbItem.DateContainerDelivery = dtoItem.DateContainerDeliveryFormated.ConvertStringToDateTime();
            }
            dbItem.TimeContainerDelivery = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + dtoItem.TimeContainerDeliveryFormated);
        }