コード例 #1
0
 public CustomersSearchProcessor(string _customerName, CustomerType_enum _customerType_enum, decimal _priceMin, decimal _priceMax, string _town,
                        DateTime _publishDateMin, DateTime _publishDateMax,
                        LawType_enum _lawType_enum, CustomersSearchDone_delegate _customersSearchDone_delegate,
                        int _searchingProgress)
 {
     customerName = _customerName;
     customerType_enum = _customerType_enum;
     priceMin = _priceMin;
     priceMax = _priceMax;
     town = _town;
     publishDateMin = _publishDateMin;
     publishDateMax = _publishDateMax;
     lawType_enum = _lawType_enum;
     customersSearchDone_delegate = _customersSearchDone_delegate;
     searchingProgress = _searchingProgress;
 }
コード例 #2
0
        // 223 закон   http://zakupki.gov.ru/223/ppa/public/organization/organization.html?epz=true&agencyId=108667
        // 94-44 закон http://zakupki.gov.ru/pgz/public/action/organization/view?source=epz&organizationId=1428866
        private string GetIDLaw(string text, out LawType_enum lawType_enum)
        {
            lawType_enum = LawType_enum.None;
            try
            {
                int IDpos = text.IndexOf("Id=");
                if (IDpos < 0)
                {
                    lawType_enum = LawType_enum.None;
                    return "";
                }

                if (text.IndexOf(@"zakupki.gov.ru/223") > -1)
                {
                    lawType_enum = LawType_enum._223;
                    return text.Substring(IDpos + 3, text.Length - (IDpos + 3));
                }
                else
                {
                    if (text.IndexOf(@"zakupki.gov.ru/pgz") > -1)
                    {
                        lawType_enum = LawType_enum._44_94;
                        return text.Substring(IDpos + 3, text.Length - (IDpos + 3));
                    }
                    else
                    {
                        lawType_enum = LawType_enum.None;
                        return "";
                    }
                }
            }
            catch
            {
                return "";
            }
        }