Beispiel #1
0
        private void btnAddDetail_Click(object sender, EventArgs e)
        {
            Common.frmSelect frm = new Common.frmSelect(true, "CMD_Cell", "IsLock=0 and ProductCode=''");
            if (frm.ShowDialog() == DialogResult.OK)
            {
                for (int i = 0; i < frm.dtSelect.Rows.Count; i++)
                {
                    DataRow dr    = frm.dtSelect.Rows[i];
                    DataRow drNew = dtDetail.NewRow();
                    drNew.BeginEdit();

                    drNew["RowID"]       = dtDetail.Rows.Count + 1;
                    drNew["BillID"]      = this.txtBillID.Text.Trim();
                    drNew["BarCode"]     = dr["PalletBarCode"].ToString();
                    drNew["ProductCode"] = dr["ProductCode"];
                    drNew["ProductName"] = dr["ProductName"];
                    drNew["CellCode"]    = dr["CellCode"];
                    drNew["CellName"]    = dr["CellName"];
                    drNew["Quantity"]    = dr["Qty"];

                    drNew.EndEdit();
                    dtDetail.Rows.Add(drNew);
                }
            }
        }
Beispiel #2
0
 private void txtProductCode_DoubleClick(object sender, EventArgs e)
 {
     Common.frmSelect frm = new Common.frmSelect(false, "CMD_ProductInStock", "ProductCode!=''");
     if (frm.ShowDialog() == DialogResult.OK)
     {
         this.txtProductCode.Text = frm.dtSelect.Rows[0]["ProductCode"].ToString();
         this.txtProductName.Text = frm.dtSelect.Rows[0]["ProductName"].ToString();
     }
 }
Beispiel #3
0
 //选择物料
 private void txtProductCode_DoubleClick(object sender, EventArgs e)
 {
     Common.frmSelect frm = new Common.frmSelect(false, "CMD_Product", "1=1");
     if (frm.ShowDialog() == DialogResult.OK)
     {
         this.txtProductCode.Text = frm.dtSelect.Rows[0]["ProductCode"].ToString();
         this.txtProductName.Text = frm.dtSelect.Rows[0]["ProductName"].ToString();
         if (this.txtQty.Text.Trim() == "" || this.txtQty.Text == "0")
         {
             this.txtQty.Text = "12";
         }
     }
 }
Beispiel #4
0
 private void btnAddDetail_Click(object sender, EventArgs e)
 {
     Common.frmSelect frm = new Common.frmSelect(true, "CMD_Product", "IsFixed='0' ");
     if (frm.ShowDialog() == DialogResult.OK)
     {
         for (int i = 0; i < frm.dtSelect.Rows.Count; i++)
         {
             DataRow dr    = frm.dtSelect.Rows[i];
             DataRow drNew = dtPallet.NewRow();
             drNew.BeginEdit();
             drNew["chk"]         = false;
             drNew["RowID"]       = dtPallet.Rows.Count + 1;
             drNew["PalletCode"]  = this.txtPalletCode.Text;
             drNew["ProductCode"] = dr["ProductCode"];
             drNew["ProductName"] = dr["ProductName"];
             drNew["ModelNo"]     = dr["ModelNo"];
             drNew["Quantity"]    = 0;
             drNew["RealQty"]     = 0;
             drNew["Indate"]      = DateTime.Now;
             drNew.EndEdit();
             dtPallet.Rows.Add(drNew);
         }
     }
 }