Пример #1
0
        public static void Map(LMYFrameWorkMVCEntities dbContext, TruckExpens src, TruckExpenseModel dest)
        {
            if (src == null || dest == null)
            {
                return;
            }

            dest.CopyPropertyValues(src);
            dest.AtDateString = src.AtDate.ToStringDateFormat();

            if (src.TruckExpensType != null)
            {
                dest.ExpenseTypeModel.CopyPropertyValues(src.TruckExpensType);
            }

            if (src.Truck != null)
            {
                dest.TruckModel.CopyPropertyValues(src.Truck);
            }
        }
Пример #2
0
        public static void Map(LMYFrameWorkMVCEntities dbContext, TruckExpenseModel src, TruckExpens dest)
        {
            if (src == null || dest == null)
            {
                return;
            }

            dest.CopyPropertyValues(src);

            if (!string.IsNullOrEmpty(src.AtDateString))
            {
                dest.AtDate = src.AtDateString.ConvertToDateTime();
            }
        }