Esempio n. 1
0
        private void PurchaseCropUpdateMethod(new_aprove_price _proxyentity, List <new_port> _portList, OrganizationServiceContext orgContext, IOrganizationService service)
        {
            List <Guid> _cropListForUpdate = (from i in orgContext.CreateQuery <new_purchase_crop>()
                                              where i.new_crop.Id == _proxyentity.new_cropid.Id &&
                                              i.new_offer_status == new OptionSetValue(100000000)
                                              select i.Id).ToList();

            foreach (var item in _cropListForUpdate)
            {
                new_purchase_crop _updateCrop = new new_purchase_crop();
                _updateCrop.Id = item;
                _updateCrop.new_recom_price_mykolaiv = _proxyentity.new_recom_purchase_price_nikolaev;
                _updateCrop.new_recom_price_odesa    = _proxyentity.new_recom_purchase_price_odessa;
                service.Update(_updateCrop);
            }
        }
Esempio n. 2
0
        private void PurchaseCropUpdateMethod(new_aprove_price _proxyentity, List<new_port> _portList, OrganizationServiceContext orgContext, IOrganizationService service)
        {
            List<Guid> _cropListForUpdate = (from i in orgContext.CreateQuery<new_purchase_crop>()
                                             where i.new_crop.Id == _proxyentity.new_cropid.Id &&
                                             i.new_offer_status == new OptionSetValue(100000000)
                                             select i.Id).ToList();

            foreach ( var item in _cropListForUpdate )
            {
                new_purchase_crop _updateCrop = new new_purchase_crop();
                _updateCrop.Id = item;
                _updateCrop.new_recom_price_mykolaiv = _proxyentity.new_recom_purchase_price_nikolaev;
                _updateCrop.new_recom_price_odesa = _proxyentity.new_recom_purchase_price_odessa;
                service.Update(_updateCrop);
            }
        }