Esempio n. 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (FJ_IDSearche.Text.ToString() != "")
            {
                Test.GoodsView searcheConsequence = SQL.searcheGoods(FJ_IDSearche.Text.ToString(), User.UserName);
                if (searcheConsequence != null)
                {
                    dataGridView1.Rows.Clear();
                    if (searcheConsequence.packed == 0)
                    {
                        dataGridView1.Rows.Add(searcheConsequence.FJ_id, searcheConsequence.DrugPrice, searcheConsequence.TotalPrice, searcheConsequence.DrugCode, searcheConsequence.DrugName, searcheConsequence.DrugWeight, searcheConsequence.Units, searcheConsequence.UserName, searcheConsequence.UserTel, searcheConsequence.FJ_time, searcheConsequence.PuzzlePrice, searcheConsequence.PuzzleTotlePrice, "重新称重", "打印", "删除");
                    }
                    else
                    {
                        dataGridView1.Rows.Add(searcheConsequence.FJ_id, searcheConsequence.DrugPrice, searcheConsequence.TotalPrice, searcheConsequence.DrugCode, searcheConsequence.DrugName, searcheConsequence.DrugWeight, searcheConsequence.Units, searcheConsequence.UserName, searcheConsequence.UserTel, searcheConsequence.FJ_time, searcheConsequence.PuzzlePrice, searcheConsequence.PuzzleTotlePrice, "已打包", "已打包", "已打包");
                    }
                }
                else
                {
                    MessageBox.Show("没有相应信息");
                }
            }
            else
            {
                MessageBox.Show("请输入分拣账号");
            }

            FJ_IDSearche.Text = "";
        }
Esempio n. 2
0
 public Main(User a)
 {
     InitializeComponent();
     User     = a;
     View     = new Test.GoodsView();   //创建一个货品实体类
     SortView = new SortWeight(User, flag, this);
     SortView.SetGoodsInfo = new Action <Test.GoodsView>(this.fuzhi);
 }
        public void ThreadMethod()
        {
            //Action<Test.GoodsView> SetGoodsInfo;
            while (true)
            {
                if (Weight.Text != "")
                {
                    info = new Test.GoodsView();
                    //MessageBox.Show("触发事件");
                    DateTime time    = DateTime.Now;
                    string   strtime = DateTime.Now.ToString("yyyyMMddHHmmssff");
                    FJ_id.Text = "FJ" + strtime;
                    //FJ_id.Text = strtime;

                    //赋值
                    info.FJ_id      = FJ_id.Text;
                    info.FJ_time    = time;
                    info.DrugCode   = GoodsInfo.DrugCode;
                    info.DrugName   = GoodsInfo.DrugName;
                    info.DrugPrice  = GoodsInfo.DrugPrice;
                    info.packed     = 0;
                    info.UserName   = user.UserName;
                    info.UserTel    = user.UserTel;
                    info.DrugWeight = Convert.ToDecimal(Weight.Text);
                    info.TotalPrice = info.DrugWeight * info.DrugPrice;

                    DrugPrice.Text  = info.DrugPrice.ToString("0.00");
                    TotalPrice.Text = info.TotalPrice.ToString("0.00");

                    //MessageBox.Show("称重成功,可以继续称重下一份商品");
                    //写入数据库
                    SQL.WriteIntoFJ(info);
                    ////打印
                    //BartenderprintShow();



                    SetGoodsInfo(info);  //执行委托到父级窗口
                    //Invoke(SetGoodsInfo, info);
                    Weight.Text = "";
                }
            }
        }
Esempio n. 4
0
 /// <remarks/>
 public void WriteIntoFJAsync(GoodsView info)
 {
     this.WriteIntoFJAsync(info, null);
 }
Esempio n. 5
0
 public void WriteIntoFJ(GoodsView info)
 {
     this.Invoke("WriteIntoFJ", new object[] {
         info
     });
 }
Esempio n. 6
0
        public void fuzhi(Test.GoodsView text)
        {
            View = text;

            dataGridView1.Rows.Add(View.FJ_id, View.DrugPrice, View.TotalPrice, View.DrugCode, View.DrugName, View.DrugWeight, View.UserName, View.UserTel, View.FJ_time, "重新称重", "打印", "删除");
        }