Beispiel #1
0
		void GetID(frmScan frm, int idversion)
		{
			if(idversion == 0)//ID cũ
			{
				CMNDCu_MatTruoc = frm.IDBefore;
				CMNDCu_MatSau = frm.IDAfter;
				CMNDCu_VanTay1 = frm.FP1;
				CMNDCu_VanTay2 = frm.FP2;
				if(frm.IDBefore != null)
				{
					picCMNDCu_MatTruoc.Image = frm.IDBefore;
				}
				if(frm.IDAfter != null)
				{
					picCMNDCu_MatSau.Image = frm.IDAfter;
				}
				if(frm.FP1 != null)
				{
					picCMNDCu_VanTay1.Image = frm.FP1;
				}
				if(frm.FP2 != null)
				{
					picCMNDCu_VanTay2.Image = frm.FP2;
				}
			}
			else if(idversion == 1)//ID mới
			{
				CMNDMoi_MatTruoc = frm.IDBefore;
				CMNDMoi_MatSau = frm.IDAfter;
				CMNDMoi_VanTay1 = frm.FP1;
				CMNDMoi_VanTay2 = frm.FP2;
				if(frm.IDBefore != null)
				{
					picCMNDMoi_MatTruoc.Image = frm.IDBefore;
				}
				if(frm.IDAfter != null)
				{
					picCMNDMoi_MatSau.Image = frm.IDAfter;
				}
				if(frm.FP1 != null)
				{
					picCMNDMoi_VanTay1.Image = frm.FP1;
				}
				if(frm.FP2 != null)
				{
					picCMNDMoi_VanTay2.Image = frm.FP2;
				}
			}
		}
Beispiel #2
0
		void EditIMG(int iID, frmScan frm)
		{
			if(iID == 0)
			{
				if(picCMNDCu_MatTruoc.Image != null)
					frm.IDBefore = picCMNDCu_MatTruoc.Image;
				if(picCMNDCu_MatSau.Image != null)
					frm.IDAfter = picCMNDCu_MatSau.Image;
				if(picCMNDCu_VanTay1.Image != null)
					frm.FP1 = picCMNDCu_VanTay1.Image;
				if(picCMNDCu_VanTay2.Image != null)
					frm.FP2 = picCMNDCu_VanTay2.Image;	
			}
			else
			{
				if(picCMNDMoi_MatTruoc.Image != null)
					frm.IDBefore = picCMNDMoi_MatTruoc.Image;
				if(picCMNDMoi_MatSau.Image != null)
					frm.IDAfter = picCMNDMoi_MatSau.Image;
				if(picCMNDMoi_VanTay1.Image != null)
					frm.FP1 = picCMNDMoi_VanTay1.Image;
				if(picCMNDMoi_VanTay2.Image != null)
					frm.FP2 = picCMNDMoi_VanTay2.Image;	
			}
		}
Beispiel #3
0
		private void picCMNDCu_VanTay2_Click(object sender, System.EventArgs e)
		{
			frmScan frm = new frmScan();
			frm.SelectIndex = 4;
			EditIMG(0, frm);
			frm.ShowDialog();
			GetID(frm, 1);
		}
Beispiel #4
0
		private void picCMNDMoi_MatSau_Click(object sender, System.EventArgs e)
		{
			frmScan frm = new frmScan();
			frm.SelectIndex = 2;
			EditIMG(1, frm);
			frm.ShowDialog();
			GetID(frm, 1);
		}
Beispiel #5
0
		private void picCMNDCu_MatTruoc_Click(object sender, System.EventArgs e)
		{
			frmScan frm = new frmScan();
			frm.SelectIndex = 1;
			EditIMG(0, frm);
			frm.ShowDialog();
			GetID(frm, 0);
		}
Beispiel #6
0
		private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if(e.Button.Text.ToLower() == "khai thác")
			{
				MessageBox.Show("OK");
				frmScan scan = new frmScan();
				scan.ShowDialog();
			}

		}