Esempio n. 1
0
        private void SelectBaseForm_Load(object sender, EventArgs e)
        {
            // загрузим список баз
            var oneCService = new OneCService();

            oneCService.serverUri = serverAddress;

            var baseSettings = oneCService.GetBaseSettings();

            if (baseSettings.success)
            {
                listBoxBase.DisplayMember = "name";
                listBoxBase.ValueMember   = "itemList";

                listBoxBase.Items.Clear();

                foreach (var item in baseSettings.settings)
                {
                    listBoxBase.Items.Add(new ListItem {
                        name = item.name, itemList = item
                    });
                }
            }
            else
            {
                MessageBox.Show(baseSettings.msg);
                DialogResult = DialogResult.Cancel;
                Close();
            }
        }
Esempio n. 2
0
        //метод вызова процедуры в 1С
        public IEnumerable <ManagerSalesStatisticsInfo> GetSalesStatisticsInfo()
        {
            var managerinfo = new List <ManagerSalesStatisticsInfo>();
            Dictionary <string, string> parss = new Dictionary <string, string>();

            parss.Add("aa", "bb");
            List <List <Dictionary <string, string> > > lldd = new List <List <Dictionary <string, string> > >();
            var resultt = OneCService.GetTableOneCData("ВернутьПланыМенеджеровАлматы", ref parss, ref lldd);

            if (resultt.Contains("#"))
            {
                throw new Exception(resultt);
            }
            foreach (var table in lldd)
            {
                foreach (var row in table)
                {
                    managerinfo.Add(new ManagerSalesStatisticsInfo(row));
                }
            }
            return(managerinfo);
        }