Example #1
0
        private void HienThi()
        {
            TaiKhoan tk = (TaiKhoan)Session["tk"];

            grdCV.DataSource = dataCV.getCV(tk.maTaiKhoan);
            DataBind();
        }
 protected void btnApply_Click(object sender, EventArgs e)
 {
     if (Session["tk"] == null)
     {
         Response.Write("<script>alert('Bạn chưa đăng nhập.')</script>");
     }
     else
     {
         TaiKhoan  tk     = (TaiKhoan)Session["tk"];
         List <CV> listcv = cvc.getCV(tk.maTaiKhoan);
         if (listcv.Count == 0)
         {
             Response.Write("<script>alert('Bạn chưa tạo CV')</script>");
         }
         else
         {
             DataList1.Visible    = true;
             DataList1.DataSource = cvc.getCV(tk.maTaiKhoan);
             DataBind();
         }
     }
 }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loadChart();
                ddlnganhnghe.DataSource     = nnc.getNganhNghe();
                ddlnganhnghe.DataTextField  = "TenNganhNghe";
                ddlnganhnghe.DataValueField = "maNganhNghe";
                ddlnganhnghe.DataBind();
                dtlbaidang.DataSource = bdc.getBaidang();
                dtlcv.DataSource      = cvc.getCV();
                DataBind();
            }
            TaiKhoan tk = (TaiKhoan)Session["tk"];

            if (tk == null)
            {
                dtlbaidang.Visible   = true;
                dtlcv.Visible        = false;
                ddlnganhnghe.Visible = true;
                tblreport.Visible    = false;
            }
            if (tk != null)
            {
                if (tk.loaiTaiKhoan == 1)
                {
                    dtlcv.Visible        = true;
                    dtlbaidang.Visible   = false;
                    ddlnganhnghe.Visible = false;
                    tblreport.Visible    = false;
                }
                if (tk.loaiTaiKhoan == 0)
                {
                    dtlbaidang.Visible = false;
                    dtlcv.Visible      = false;
                    tblreport.Visible  = true;
                }
                if (tk.loaiTaiKhoan == 2)
                {
                    dtlbaidang.Visible   = true;
                    dtlcv.Visible        = false;
                    ddlnganhnghe.Visible = true;
                    tblreport.Visible    = false;
                }
            }
        }