예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            stype = 1;
            FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(1, this);

            frmArrendanceAdd.ShowDialog(this);
        }
예제 #2
0
 private void dgvMain_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(3, this);
         frmArrendanceAdd.DgvRow = dgvMain.Rows[e.RowIndex];
         frmArrendanceAdd.ShowDialog(this);
     }
 }
예제 #3
0
        private void btnLaws_Click(object sender, EventArgs e)
        {
            stype = 1;
            DataGridViewRow r = null;
            int             i = 0;

            foreach (DataGridViewRow row in dgvMain.Rows)
            {
                if (row.Cells[0].Value != null)
                {
                    if (row.Cells[0].Value.Equals("True"))
                    {
                        i++;
                        if (i > 1)
                        {
                            break;
                        }
                        r = row;
                    }
                }
            }

            if (i == 0)
            {
                MessageBox.Show("请选择要修改的班次配置", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            else if (i > 1)
            {
                MessageBox.Show("所选班次不能大于1个,请重新选择!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            if (r != null)
            {
                FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(2, this);
                frmArrendanceAdd.DgvRow = r;
                frmArrendanceAdd.ShowDialog(this);
            }
        }
예제 #4
0
 private void dgvMain_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.RowIndex>=0)
     {
         FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(3, this);
         frmArrendanceAdd.DgvRow = dgvMain.Rows[e.RowIndex];
         frmArrendanceAdd.ShowDialog(this);
     }
 }
예제 #5
0
        private void btnLaws_Click(object sender, EventArgs e)
        {
            stype = 1;
            DataGridViewRow r = null;
            int i = 0;
            foreach (DataGridViewRow row in dgvMain.Rows)
            {
                if (row.Cells[0].Value != null)
                {
                    if (row.Cells[0].Value.Equals("True"))
                    {
                        i++;
                        if (i>1)
                        {
                            break;
                        }
                        r = row;
                    }
                }
            }

            if (i==0)
            {
                MessageBox.Show("请选择要修改的班次配置", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            else if (i > 1)
            {
                MessageBox.Show("所选班次不能大于1个,请重新选择!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            if (r!=null)
            {
                FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(2, this);
                frmArrendanceAdd.DgvRow = r;
                frmArrendanceAdd.ShowDialog(this);
            }
        }
예제 #6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     stype = 1;
     FrmArrendanceAdd frmArrendanceAdd = new FrmArrendanceAdd(1, this);
     frmArrendanceAdd.ShowDialog(this);
 }