Ejemplo n.º 1
0
        public static VendorTypeMD Translate(this VendorTypeDE from)
        {
            var to = new VendorTypeMD();

            to.Id          = from.Id;
            to.Type        = from.Type;
            to.Description = from.Description;
            to.CreatedById = from.CreatedById;
            to.CompanyId   = from.CompanyId.Value;
            to.CreatedDate = from.CreatedDate;

            return(to);
        }
Ejemplo n.º 2
0
        public static VendorTypeDE Translate(this VendorTypeMD from, VendorTypeDE dest = null)
        {
            var to = dest ?? new VendorTypeDE();

            if (to.Id <= 0)
            {
                to.Id       = from.Id;
                to.IsActive = true;
            }
            else
            {
                to.IsActive = from.IsActive;
            }
            to.Type        = from.Type;
            to.Description = from.Description;
            to.CreatedById = from.CreatedById;
            to.CompanyId   = from.CompanyId;
            to.CreatedDate = from.CreatedDate;


            return(to);
        }