Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     //将batchlist第2个批次名 下增加record记录
     try
     {
         BatchInfo bi = od.batchList[1];
         od.batchList[1].dt = dataType.modify;
         od.batchList[1].productTypeFullPath   = "002";
         od.batchList[1].testingSetUpFullPatch = @"d:\test";
         for (int i = 0; i < bi.recordList.Count; i++)
         {
             bi.recordList[i].dt           = dataType.add;
             bi.recordList[i].batchName    = bi.name;
             bi.recordList[i].weldNo       = i + 1;
             bi.recordList[i].num          = i + 10;
             bi.recordList[i].result       = "ok";
             bi.recordList[i].fileFullPath = @"d:\test";
             OderInfo.ReSync(od);
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }
Ejemplo n.º 2
0
        private void btnOpOrder_Click(object sender, EventArgs e)
        {
            FrmOpOrder      frmoo = new FrmOpOrder();
            List <OderInfo> lst   = new List <OderInfo>();

            if (frmoo.ShowDialog() == DialogResult.OK)
            {
                textOrder.Text = frmoo.Flag;
                try
                {
                    dataBatch.DataSource = DataClass.MySQLFunction.BindData(textOrder.Text.Trim()).Tables[0];
                    lst = DataClass.MySQLFunction.ReadOrderData(textOrder.Text);
                    //多条记录
                    this.od       = lst[0];
                    od.isLoad     = true;
                    textSize.Text = DataClass.MySQLFunction.GetDateSize();
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.Message);
                }
            }
        }
Ejemplo n.º 3
0
        //resync to database
        public static void ReSync(OderInfo od)

        {
            DataClass.MySQLFunction.AddListToBatchtbl(od.batchList);
        }