Esempio n. 1
0
        private void frmStorageAdd_Load(object sender, EventArgs e)
        {
            comStock.Items.Clear();
            comProductNo.Items.Clear();
            MesStockBLL StockBLL = new MesStockBLL();
            var         row      = StockBLL.GetData(" where s_Kind = 1");
            int         nCount   = row.Count;

            for (int i = 0; i < nCount; i++)
            {
                comStock.Items.Add(row[i].S_Code.ToString() + "$" + row[i].S_Name.ToString());
            }

            MesProductOrderHeadBLL ProductOrderHeadBLL = new MesProductOrderHeadBLL();
            var Product = ProductOrderHeadBLL.GetList("");

            int nCount2 = Product.Count;

            for (int j = 0; j < nCount2; j++)
            {
                comProductNo.Items.Add(Product[j].P_OrderNo.ToString() + "$" + Product[j].P_OrderDate.ToString());
            }

            string strCondit = " where S_EffectTime > '" + DateTime.Now + "'";

            MesSupplyBLL SupplyBLL = new MesSupplyBLL();
            var          Supply    = SupplyBLL.GetList(strCondit);
            int          nCount3   = Supply.Count;

            for (int k = 0; k < nCount3; k++)
            {
                cmbSupply.Items.Add(Supply[k].S_Code + "$" + Supply[k].S_Name);
            }
        }
Esempio n. 2
0
        private void comOrderNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            MesProductOrderHeadBLL ProductOrderHeadBLL = new MesProductOrderHeadBLL();
            var row = ProductOrderHeadBLL.GetList(comOrderNo.Text);

            txtOrderDate.Text = row[0].P_OrderDate.ToString();
        }
 private void txtOrderNo_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)//如果输入的是回车键
     {
         MesProductOrderHeadBLL MesProductOrderHeadBLL = new MesProductOrderHeadBLL();
         var rows = MesProductOrderHeadBLL.GetList(txtOrderNo.Text.Trim());
         if (rows == null || rows.Count < 1)
         {
             untCommon.InfoMsg("输入的生产订单号错误,请重新输入!");
             txtOrderNo.Focus();
             txtOrderNo.SelectAll();
         }
         else
         {
             txtGoodsCode.Focus();
         }
     }
 }