public static Requisition Create(int Id, string JobId, string RefId, string ProjectName, decimal?EstimatedCost, DateTime?StartDate, DateTime?EndDate, string RequisitionApprovalRefId,
                                  string EmployeeMail, int?AccountId, string RequisitionTypeId, double?DocumentsPrice, int?ProjectPeriodinMonth, int RequisitionNatureId, bool OneMillionPlus, int?ProjectTypeId,
                                  ICollection <PrcRequisitionVendors> PrcRequisitionVendors)
 {
     return(new Requisition()
     {
         Id = Id,
         JobID = JobId,
         REF_ID = RefId,
         ProjectName = ProjectName,
         EstimatedCost = EstimatedCost,
         StartDate = StartDate,
         EndDate = EndDate,
         RequisitionApprovalREF_ID = RequisitionApprovalRefId,
         EmployeeMail = EmployeeMail,
         AccountID = AccountId,
         RequisitionTypeID = RequisitionTypeId,
         DocumentsPrice = DocumentsPrice,
         ProjectPeriodinMonth = ProjectPeriodinMonth,
         RequisitionNatureID = RequisitionNatureId,
         OneMillionPlus = OneMillionPlus,
         ProjectTypeID = ProjectTypeId,
         Vendors = RequisitionVendor.CastToListOfVendors(PrcRequisitionVendors)
     });
 }
Exemple #2
0
        public static ICollection <RequisitionVendor> CastToListOfVendors(ICollection <PrcRequisitionVendors> Vendors)
        {
            ICollection <RequisitionVendor> vendors = new List <RequisitionVendor>();

            if (Vendors != null && Vendors.Count > 0)
            {
                foreach (RequisitionVendor one in Vendors)
                {
                    vendors.Add(
                        RequisitionVendor.Create(one.Id, one.VendorName, one.PhoneNo, one.FaxNo,
                                                 one.EMail, one.RequisitionID)
                        );
                }
            }

            return(vendors);
        }