Ejemplo n.º 1
0
 private void textBox1_Enter(object sender, EventArgs e)
 {
     if (form != null && !form.IsDisposed)
         form.Show();
     else
     {
         form = new I_Search_Form(this);
         this.AddOwnedForm(form);
         form.setDataSource(goodsList);
         form.Show();
     }
 }
Ejemplo n.º 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)
            {
                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();
            }
        }