Esempio n. 1
0
 public void Modify(SupplierPpeTypeModel s)
 {
     PpeTypeOther    = s.PpeOther;
     CostTypeId      = (int)s.CostType;
     CostTypeOther   = s.CostTypeOther;
     CapacityPerWeek = s.CapacityPerWeek.Value;
     CurrentStock    = s.CurrentStock.Value;
     LeadTimeInDays  = s.LeadTimeInDays.Value;
     MeetsRegulatoryRequirementsId = (int)s.MeetsRegulations.Value;
 }
        public static SupplierPpeType Create_FromViewModel(SupplierPpeTypeModel s, Supplier supplier)
        {
            SupplierPpeType respVal = new SupplierPpeType();

            respVal.Supplier     = supplier;
            respVal.PpeTypeId    = (byte)s.Type;
            respVal.PpeTypeOther = s.PpeOther;
            respVal.MeetsRegulatoryRequirementsId = (int)s.MeetsRegulations.Value;
            respVal.CostTypeId      = (int)s.CostType.Value;
            respVal.CostTypeOther   = s.CostTypeOther;
            respVal.CapacityPerWeek = s.CapacityPerWeek.Value;
            respVal.CurrentStock    = s.CurrentStock.Value;
            respVal.LeadTimeInDays  = s.LeadTimeInDays.Value;
            respVal.Notes           = s.Notes;

            return(respVal);
        }