Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedIndex = 1;
            gridInfo.DataSource       = null;
            labelProcess.Visible      = true;
            gridInfo.Refresh();
            tabControl1.Refresh();
            string str = WebHTTP.getStrInfoBox(AddrIP, @"/api/tss/assembly-order/" + cbOrderId.Text + @"/get-cases?access-token=" + tokenId);

            editGETRequset.Text = str;
            str = WebHTTP.SendGet(str);
            List <InfoLevelBox>       ilb     = JsonConvert.DeserializeObject <List <InfoLevelBox> >(str);
            List <InfoLevelBoxDetail> ilb_det = new List <InfoLevelBoxDetail>();

            foreach (InfoLevelBox item in ilb)
            {
                foreach (string s in item.childes)
                {
                    ilb_det.Add(new InfoLevelBoxDetail(item.id, item.data_type, item.grpcode, item.wmscode, s, item.childes.Count));
                }
            }


            gridInfo.DataSource = ilb_det;
            gridInfo.Refresh();
            labelProcess.Visible = false;

            PalCount.Text = gridView1.RowCount.ToString();// GetChildRowCount.ToString();
        }
Example #2
0
        public FormMain()
        {
            InitializeComponent();
            Text    = "GetOrderInfo by(c)Kandakov Dmitry   v" + Application.ProductVersion;
            tokenId = statusStripMain.Items[1].Text = Properties.Settings.Default.TokenId;
            tLogin  = textLogin.Text = Properties.Settings.Default.Login;
            tPass   = textPassword.Text = Properties.Settings.Default.Password;

            this.Height = Properties.Settings.Default.WinHeight;
            Location    = new Point(Properties.Settings.Default.WinX, Properties.Settings.Default.WinY);
            orders      = new List <Order>();
            if (Properties.Settings.Default.ConnetcionLocal == "локальный")
            {
                strGetId    = WebHTTP.getStrId("10.10.10.4");
                strGetOrder = WebHTTP.getStrOrder("10.10.10.4");
                remoteToolStripMenuItem.Checked = true;
            }
            else
            {
                strGetId            = WebHTTP.getStrId("109.73.38.93:61079");
                strGetOrder         = WebHTTP.getStrOrder("109.73.38.93:61079");
                editGETRequset.Text = strGetOrder;

                localToolStripMenuItem.Checked = true;
            }
            editGETRequset.Text           = strGetOrder;
            toolStripDropDownButton1.Text = Properties.Settings.Default.ConnetcionLocal;
        }
Example #3
0
 private void localToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!localToolStripMenuItem.Checked)
     {
         strGetId                                    = WebHTTP.getStrId("109.73.38.93:61079");
         strGetOrder                                 = WebHTTP.getStrOrder("109.73.38.93:61079");
         editGETRequset.Text                         = strGetOrder;
         localToolStripMenuItem.Checked              = true;
         remoteToolStripMenuItem.Checked             = false;
         toolStripDropDownButton1.Text               = "удаленный";
         Properties.Settings.Default.ConnetcionLocal = "удаленный";
         Properties.Settings.Default.Save();
     }
 }