Пример #1
0
        private SupplierDepartmentEditModel BuildSupplierDeptEditModelAC(SupplierDepartment sdentity)
        {
            SupplierDepartmentEditModel strSupplierDeptList = new SupplierDepartmentEditModel();

            strSupplierDeptList.SupplierDepartmentName = sdentity.Supplier.SupplierCode + " - " + sdentity.Supplier.SupplierCompanyName + " - ";
            strSupplierDeptList.SupplierDepartmentName = strSupplierDeptList.SupplierDepartmentName + sdentity.SupplierDepartmentName + " - " + sdentity.Commission + " - " + sdentity.Handling;
            strSupplierDeptList.SupplierDepartmentID   = sdentity.SupplierDepartmentID;
            strSupplierDeptList.CountryID   = sdentity.CountryID ?? Guid.Parse("00760000-0000-0001-0006-827344180700");
            strSupplierDeptList.CountryName = sdentity.Country == null ? "United Kingdom" : sdentity.Country.CountryName;
            return(strSupplierDeptList);
        }
Пример #2
0
        private void InsertSupplierDepartmentLocation(SupplierDepartment depaItem, List <Guid> locaGuidList)
        {
            var SDLitem = new SupplierDepartmentLocation();

            SDLitem.SupplierDepartmentLocationID = PrimeActs.Service.IDGenerator.NewGuid(_serverCode[0]);
            SDLitem.SupplierDepartmentID         = depaItem.SupplierDepartmentID;
            SDLitem.CreatedBy   = depaItem.CreatedBy;
            SDLitem.CreatedDate = depaItem.CreatedDate;
            SDLitem.UpdatedBy   = depaItem.UpdatedBy;
            SDLitem.UpdatedDate = depaItem.UpdatedDate;
            foreach (var locaGuid in locaGuidList)
            {
                SDLitem.SupplierLocationID = locaGuid;
                _supplierDepartmentLocationService.Insert(SDLitem);
            }
        }