예제 #1
0
        private void initInfo_BackGround(
         object sender,
         RunWorkerCompletedEventArgs e)
        {
            InOutHandleNsTalk talk = new InOutHandleNsTalk();
            Protocol pro = talk.Get_In_Needed_Info(ClientInfo.session);
            if (pro.protoType == ProtoType.SUCCESS)
            {
                this.textBox1.Text = "";
                this.textBox2.Text = "";
                goodsList = pro.mutilData[0];
                depotList = pro.mutilData[1];
                countList = pro.mutilData[2];

                form = new I_Search_Form(this);
                this.AddOwnedForm(form);
                form.setDataSource(goodsList);

                List<string> depotDataSource = new List<string>();
                foreach (List<string> str in depotList)
                {
                    depotDataSource.Add(str[0]);
                }
                this.comboBox1.DataSource = depotDataSource;
                //G_Name,S_Name,H_Name,G_Addr,G_Price,C_Num
                List<String> names=new List<String>();
                names.Add("货物名称");
                names.Add("货物类型");
                names.Add("仓库名称");
                names.Add("货物地址");
                names.Add("货物价格");
                names.Add("货物存量");
                List<List<string>> subList=getSubSelectedCountList(textBox1.Text, comboBox1.Text);
                this.dataGridView1.DataSource = TableDataUtil.convertListListDataToDataTable(names, subList);
            }
            else if (pro.protoType == ProtoType.OUT_OF_TIME)
            {
                MessageBox.Show("系统超时,请重新登录");
                this.Close();
            }
            else if (pro.protoType == ProtoType.ERROR)
            {
                MessageBox.Show("获取信息错误,请重新获取");
                this.Close();
            }
        }
예제 #2
0
        private void initInfo_BackGround(
         object sender,
         RunWorkerCompletedEventArgs e)
        {
            InOutHandleNsTalk talk = new InOutHandleNsTalk();
            Protocol pro = talk.Get_In_Needed_Info(ClientInfo.session);
            if (pro.protoType == ProtoType.SUCCESS)
            {
                goodsList = pro.mutilData[0];
                depotList = pro.mutilData[1];
                countList = pro.mutilData[2];
                styleList = pro.mutilData[3];

                List<string> depotDataSource = new List<string>();
                depotDataSource.Add("");
                foreach (List<string> str in depotList)
                {
                    depotDataSource.Add(str[0]);
                }
                this.H_name_cb.DataSource = depotDataSource;

                List<string> styleDataSource = new List<string>();
                styleDataSource.Add("");
                foreach (List<string> str in styleList)
                {
                    styleDataSource.Add(str[1]);
                }
                this.G_style_cb.DataSource = styleDataSource;
                this.G_addr_tb.Text = "";
                this.G_Name_tb.Text = "";

                this.updateDataGrid();

            }
            else if (pro.protoType == ProtoType.OUT_OF_TIME)
            {
                MessageBox.Show("系统超时,请重新登录");
                this.Close();
            }
            else if (pro.protoType == ProtoType.ERROR)
            {
                MessageBox.Show("获取信息错误,请重新获取");
                this.Close();
            }
        }