Пример #1
0
        public GarmentBuyerViewModel MapToViewModel(GarmentBuyer garmentBuyer)
        {
            GarmentBuyerViewModel garmentBuyerVM = new GarmentBuyerViewModel();

            garmentBuyerVM.Id                 = garmentBuyer.Id;
            garmentBuyerVM._IsDeleted         = garmentBuyer._IsDeleted;
            garmentBuyerVM.Active             = garmentBuyer.Active;
            garmentBuyerVM._CreatedUtc        = garmentBuyer._CreatedUtc;
            garmentBuyerVM._CreatedBy         = garmentBuyer._CreatedBy;
            garmentBuyerVM._CreatedAgent      = garmentBuyer._CreatedAgent;
            garmentBuyerVM._LastModifiedUtc   = garmentBuyer._LastModifiedUtc;
            garmentBuyerVM._LastModifiedBy    = garmentBuyer._LastModifiedBy;
            garmentBuyerVM._LastModifiedAgent = garmentBuyer._LastModifiedAgent;
            garmentBuyerVM.Code               = garmentBuyer.Code;
            garmentBuyerVM.Name               = garmentBuyer.Name;
            garmentBuyerVM.Address            = garmentBuyer.Address;
            garmentBuyerVM.City               = garmentBuyer.City;
            garmentBuyerVM.Country            = garmentBuyer.Country;
            garmentBuyerVM.Contact            = garmentBuyer.Contact;
            garmentBuyerVM.Tempo              = garmentBuyer.Tempo;
            garmentBuyerVM.Type               = garmentBuyer.Type;
            garmentBuyerVM.NPWP               = garmentBuyer.NPWP;

            return(garmentBuyerVM);
        }
Пример #2
0
        public GarmentBuyer MapToModel(GarmentBuyerViewModel garmentBuyerVM)
        {
            GarmentBuyer garmentBuyer = new GarmentBuyer();

            garmentBuyer.Id                 = garmentBuyerVM.Id;
            garmentBuyer._IsDeleted         = garmentBuyerVM._IsDeleted;
            garmentBuyer.Active             = garmentBuyerVM.Active;
            garmentBuyer._CreatedUtc        = garmentBuyerVM._CreatedUtc;
            garmentBuyer._CreatedBy         = garmentBuyerVM._CreatedBy;
            garmentBuyer._CreatedAgent      = garmentBuyerVM._CreatedAgent;
            garmentBuyer._LastModifiedUtc   = garmentBuyerVM._LastModifiedUtc;
            garmentBuyer._LastModifiedBy    = garmentBuyerVM._LastModifiedBy;
            garmentBuyer._LastModifiedAgent = garmentBuyerVM._LastModifiedAgent;
            garmentBuyer.Code               = garmentBuyerVM.Code;
            garmentBuyer.Name               = garmentBuyerVM.Name;
            garmentBuyer.Address            = garmentBuyerVM.Address;
            garmentBuyer.City               = garmentBuyerVM.City;
            garmentBuyer.Country            = garmentBuyerVM.Country;
            garmentBuyer.Contact            = garmentBuyerVM.Contact;
            garmentBuyer.Tempo              = !Equals(garmentBuyerVM.Tempo, null) ? Convert.ToInt32(garmentBuyerVM.Tempo) : null; /* Check Null */
            garmentBuyer.Type               = garmentBuyerVM.Type;
            garmentBuyer.NPWP               = garmentBuyerVM.NPWP;

            return(garmentBuyer);
        }
Пример #3
0
        public GarmentBuyerViewModel GetEmptyData()
        {
            GarmentBuyerViewModel viewModel = new GarmentBuyerViewModel();

            return(viewModel);
        }