예제 #1
0
        private void rptTenTaiSan_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Tag.ToString() == "Chọn")
            {
                var chonTaisan = new DanhSachTaiSan();
                chonTaisan.SetTaiSan += (tentaisan) =>
                {
                    if (gbList.GetFocusedDataSourceRowIndex() < 0)
                    {
                        gbList.AddNewRow();
                    }

                    gbList.SetFocusedRowCellValue(colTen_Tai_San, tentaisan);
                    gbList.UpdateCurrentRow();
                };
                chonTaisan.ShowDialog();
            }
        }
예제 #2
0
 private void rptHyperlinkTim_Click(object sender, EventArgs e)
 {
     var frm = new DanhSachTaiSan();
     frm.SetTaiSan += (string tentaisan) =>
     {
         gbList.SetFocusedRowCellValue(colTen_Tai_San, tentaisan);
     };
     frm.ShowDialog();
 }