コード例 #1
0
        private void barButtonItem11_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmDieuchuyen frm = new frmDieuchuyen(Cns);

            frm.opt = 0;
            frm.ShowDialog();
            dieuchuyen_Load();
        }
コード例 #2
0
 private void barButtonItem12_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         frmDieuchuyen frm = new frmDieuchuyen(Cns);
         frm.opt             = 1;
         frm.ma              = Guid.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ma").ToString());
         frm.txtMaHT.Text    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "hienthima").ToString();
         frm.txtNgTH.Text    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "nguoidieuchuyen").ToString();
         frm.dtpNgayDC.Value = DateTime.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ngaydieuchuyen").ToString());
         frm.cbnPmden.Text   = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "phongdenma").ToString();
         frm.cbnPMDi.Text    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "phongdima").ToString();
         frm.ShowDialog();
         dieuchuyen_Load();
     }
     catch (Exception ex)
     {
         MessageBox.Show("lỗi:" + ex);
     }
 }