コード例 #1
0
ファイル: ScanServiceAccess.cs プロジェクト: rrossenbg/vprint
        public Dictionary <int, CurrentUser> RetrieveUsers()
        {
            var proxy = new PartyManagementSoapClient();
            var data  = proxy.RetrieveTableData(new PAuthenticationHeader(), "us_id, us_first_name, us_last_name, us_iso_id", "Users", "");

            return(data.ToDict(4, (o, i) => { return Convert.ToInt32(o[i]); }, (o, i) => { return new CurrentUser(Convert.ToInt32(o[i]), o[i + 1] + " " + o[i + 2], Convert.ToInt32(o[i + 3])); }));
        }
コード例 #2
0
ファイル: ScanServiceAccess.cs プロジェクト: rrossenbg/vprint
        public Retailer[] RetrieveRetailerList(PAuthenticationHeader header, int countryId, int headOfficeId)
        {
            var client  = new PartyManagementSoapClient();
            var results = client.RetrieveRetailerList(header, countryId, headOfficeId);

            return(results);
        }
コード例 #3
0
ファイル: FormLogin.cs プロジェクト: rrossenbg/vprint
        public FormLogin()
        {
            InitializeComponent();

            m_Version       = Assembly.GetEntryAssembly().GetName().Version;
            lblVersion.Text = "Version: ".concat(m_Version.ToString());
#if DEBUG
            //lblVersion.Text = lblVersion.Text.concat(" <DEBUG>");
#endif
            var header    = new PartyManagementRef.AuthenticationHeader();
            var service   = new PartyManagementSoapClient();
            var countries = new Func <PartyManagementSoapClient, CountryDetail[]>((s) => s.GetPtfCountryList(header)).ReTry(service);
            if (countries == null)
            {
                throw new ApplicationException("Can not connect to the server.");
            }

            foreach (var country in countries.OrderBy(c => c.Nationality))
            {
                cbCountryID.Items.Add(country);
            }

            int countryId = Config.CountryID;

            cbCountryID.SetSelected <CountryDetail>((c) => c.Number == countryId);
        }
コード例 #4
0
ファイル: Helper.cs プロジェクト: rrossenbg/vprint
        public static Func <List <CountryDetail> > CreateCountryDropDownLoadFunction()
        {
            var funct = new Func <List <CountryDetail> >(() =>
            {
                var client   = new PartyManagementSoapClient();
                var results  = client.GetPtfCountryList(new AuthenticationHeader());
                var results2 = results.ToList();
                results2.Sort((c1, c2) => string.Compare(c1.Country, c2.Country));
                return(results2);
            });

            return(funct);
        }