Example #1
0
        private void tsbthem1_Click(object sender, EventArgs e)
        {
            PhieuThu1 frm = new PhieuThu1();

            frm.THEM = true;
            frm.MAPT = DEMPT2.ToString();
            frm.ShowDialog();
            LoadDataPT();
        }
Example #2
0
 public void LoadDataPT()
 {
     try
     {
         gridPhieuthu.DataSource = pt.LayPhieuThu();
         DEMPT1 = int.Parse(gridView1.RowCount.ToString());
         if (DEMPT1 == 0)
         {
             DEMPT2 = 1;
         }
         else
         {
             DEMPT2 = int.Parse(gridView1.GetRowCellValue(DEMPT1 - 1, "MAPT").ToString()) + 1;
         }
         repositoryItemLookUpEdit1.DataSource    = Nv.LayNhanVien();
         repositoryItemLookUpEdit1.DisplayMember = "HOTEN";
         repositoryItemLookUpEdit1.ValueMember   = "MANV";
         DEM1 = DEMPT2.ToString();
     }
     catch
     {
         MessageBox.Show("Không lấy được dữ liệu thừ cơ sở dữ liệu.", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }