コード例 #1
0
        private void brSua_ItemClick(object sender, RoutedEventArgs e)
        {
            if (gridControl1.GetFocusedRow() != null)
            {
                string db = gridControl1.GetFocusedRowCellValue(diaban)==null ? "":gridControl1.GetFocusedRowCellValue(diaban).ToString().Trim();
                if (db.Length > 1)
                    db = db.Substring(1, db.Length - 1);

                frmnhapnvcs frm = new frmnhapnvcs(true,db);
                frm.txtmanv.Text = gridControl1.GetFocusedRowCellValue(ma_nvcs).ToString().Trim();
                frm.txtten.Text = gridControl1.GetFocusedRowCellValue(ten_nv).ToString().Trim();
                frm.txtphone.Text = gridControl1.GetFocusedRowCellValue(phone)==null? "": gridControl1.GetFocusedRowCellValue(phone).ToString().Trim();
                frm.checkEdit1.IsChecked = gridControl1.GetFocusedRowCellValue(kt)==null? false: Convert.ToBoolean(gridControl1.GetFocusedRowCellValue(kt));
                this.Close(); 
                frm.Show();
            }
            else
                MessageBox.Show("Chưa chọn nhân viên cần sửa !");
        }       
コード例 #2
0
 private void brThem_ItemClick(object sender, RoutedEventArgs e)
 {
     this.Close();
     frmnhapnvcs frm = new frmnhapnvcs(false,"");
     frm.Show();
 }