예제 #1
0
        private void lblThu2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                string lbl = ((LinkLabel)sender).Name;
                if (lbl == "lbl0")
                {
                    thu = Thu.Thu2;
                }
                else if (lbl == "lbl1")
                {
                    thu = Thu.Thu3;
                }
                else if (lbl == "lbl2")
                {
                    thu = Thu.Thu4;
                }
                else if (lbl == "lbl3")
                {
                    thu = Thu.Thu5;
                }
                else if (lbl == "lbl4")
                {
                    thu = Thu.Thu6;
                }
                else if (lbl == "lbl5")
                {
                    thu = Thu.Thu7;
                }
                else
                {
                    thu = Thu.ChuNhat;
                }

                frmNhapDeNghi frm = new frmNhapDeNghi()
                {
                    Text = thu.ToString(), MaGV = maGV, HocKy = hocKy, NamHoc = namHoc
                };
                frm.truyen += new frmNhapDeNghi.TruyenMatKhau(NhanDuLieu);
                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                ExceptionUtil.ThrowMsgBox(ex.Message);
            }
        }
        private void lblThu2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                string lbl = ((LinkLabel)sender).Name;
                if (lbl == "lbl0")
                {
                    thu = Thu.Thu2;
                }
                else if (lbl == "lbl1")
                {
                    thu = Thu.Thu3;
                }
                else if (lbl == "lbl2")
                {
                    thu = Thu.Thu4;
                }
                else if (lbl == "lbl3")
                {
                    thu = Thu.Thu5;
                }
                else if (lbl == "lbl4")
                {
                    thu = Thu.Thu6;
                }
                else if (lbl == "lbl5")
                {
                    thu = Thu.Thu7;
                }
                else
                {
                    thu = Thu.ChuNhat;
                }

                frmInput frm = new frmInput();
                frm.Text    = thu.ToString();
                frm.truyen += new frmInput.TruyenMatKhau(NhanDuLieu);
                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }