示例#1
0
 private void btn_mod_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
     {
         if (this.dataGridView1.Rows[i].Cells[0].EditedFormattedValue.ToString() == "True")
         {
             if (this.dataGridView1.Rows[i].Cells[7].Value.ToString() == "未下达")
             {
                 运输计划修改 dlg = new 运输计划修改(this.dataGridView1.Rows[i].Cells["ID"].Value.ToString(), "年");
                 dlg.ShowDialog();
             }
             else
             {
                 MessageBox.Show("该年计划不可修改!", "提示");
             }
         }
     }
 }
 private void btn_mod_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
     {
         if (this.dataGridView1.Rows[i].Cells[0].EditedFormattedValue.ToString() == "True")
         {
             if (this.dataGridView1.Rows[i].Cells[7].Value.ToString() == "新增" ||
                 this.dataGridView1.Rows[i].Cells[7].Value.ToString() == "不通过")
             {
                 if (this.usrKind != "业务员")
                 {
                     MessageBox.Show("用户权限不够!", "提示");
                     return;
                 }
                 运输计划修改 dlg = new 运输计划修改(this.dataGridView1.Rows[i].Cells["ID"].Value.ToString(), "周");
                 dlg.ShowDialog();
             }
             else
             {
                 MessageBox.Show("该周计划不可修改!", "提示");
             }
         }
     }
 }