private void  接完成ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddWorkerIDFrm addID = new AddWorkerIDFrm();

            if (addID.ShowDialog() == DialogResult.OK)
            {
                string    frmtext      = this.Parent.Text.ToString();
                string    workID       = addID.nametb.Text.ToString();
                DateTime  datetime     = System.DateTime.Now;
                ArrayList selectedlist = new ArrayList();
                foreach (DataGridViewRow dr in this.dataGridView1.Rows)
                {
                    if (dr.Selected == true)
                    {
                        selectedlist.Add(dr.Index);
                    }
                }
                for (int i = 0; i < selectedlist.Count; i++)
                {
                    int    index        = int.Parse(selectedlist[i].ToString());
                    string projectidStr = this.dataGridView1.Rows[index].Cells["项目号"].Value.ToString();
                    string drawingStr   = this.dataGridView1.Rows[index].Cells["图纸号"].Value.ToString();
                    string spoolStr     = this.dataGridView1.Rows[index].Cells["小票号"].Value.ToString();
                    WorkShopStatusFlow.UpdatePersonStatus("SP_UPDATEPERSONSTATUS", projectidStr, drawingStr, spoolStr, workID, datetime, frmtext);
                    this.dataGridView1.Rows[index].Cells["焊工号"].Value  = workID;
                    this.dataGridView1.Rows[index].Cells["焊接日期"].Value = datetime;
                }
                selectedlist.Clear();
            }
        }
示例#2
0
 private void 下料完成ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AddWorkerIDFrm addID = new AddWorkerIDFrm();
     if (addID.ShowDialog() == DialogResult.OK)
     {
         string frmtext = this.Parent.Text.ToString();
         string workID = addID.nametb.Text.ToString();
         DateTime datetime = System.DateTime.Now;
         ArrayList selectedlist = new ArrayList();
         foreach (DataGridViewRow dr in this.dataGridView1.Rows)
         {
             if (dr.Selected == true)
             {
                 selectedlist.Add(dr.Index);
             }
         }
         for (int i = 0; i < selectedlist.Count; i++)
         {
             int index = int.Parse(selectedlist[i].ToString());
             string projectidStr = this.dataGridView1.Rows[index].Cells["项目号"].Value.ToString();
             string drawingStr = this.dataGridView1.Rows[index].Cells["图纸号"].Value.ToString();
             string spoolStr = this.dataGridView1.Rows[index].Cells["小票号"].Value.ToString();
             WorkShopStatusFlow.UpdatePersonStatus("SP_UPDATEPERSONSTATUS", projectidStr, drawingStr, spoolStr, workID, datetime, frmtext);
             this.dataGridView1.Rows[index].Cells["下料人"].Value = workID;
             this.dataGridView1.Rows[index].Cells["下料日期"].Value = datetime;
         }
         selectedlist.Clear();
         MessageBox.Show("--------完成--------");
     }
 }