예제 #1
0
 private void EmployeeGrid_DoubleClick(object sender, EventArgs e)
 {
     if (EmployeeGrid.CurrentRow.Index != -1)
     {
         this.Hide();
         Promote ss = new Promote();
         ss.Surname          = EmployeeGrid.CurrentRow.Cells[0].Value.ToString();
         ss.OtherNames       = EmployeeGrid.CurrentRow.Cells[1].Value.ToString();
         ss.RCCNO            = EmployeeGrid.CurrentRow.Cells[2].Value.ToString();
         ss.YearLastPromoted = EmployeeGrid.CurrentRow.Cells[3].Value.ToString();
         ss.Designation      = EmployeeGrid.CurrentRow.Cells[4].Value.ToString();
         ss.DateofBirth      = EmployeeGrid.CurrentRow.Cells[5].Value.ToString();
         ss.GradeLevel       = EmployeeGrid.CurrentRow.Cells[6].Value.ToString();
         ss.ShowDialog();
     }
 }
예제 #2
0
        private void ListofRetiree_Load(object sender, EventArgs e)
        {
            // ListofRetiree.DataSource = dt;

            if (ListofRetireGrid.CurrentRow.Index != -1)
            {
                this.Hide();
                Promote ss = new Promote();
                ss.Surname          = ListofRetireGrid.CurrentRow.Cells[0].Value.ToString();
                ss.OtherNames       = ListofRetireGrid.CurrentRow.Cells[1].Value.ToString();
                ss.RCCNO            = ListofRetireGrid.CurrentRow.Cells[2].Value.ToString();
                ss.YearLastPromoted = ListofRetireGrid.CurrentRow.Cells[3].Value.ToString();
                ss.Designation      = ListofRetireGrid.CurrentRow.Cells[4].Value.ToString();
                ss.DateofBirth      = ListofRetireGrid.CurrentRow.Cells[5].Value.ToString();
                ss.ShowDialog();
            }
        }