Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            QUANLYSINHVIENEntities dbContext           = new QUANLYSINHVIENEntities();
            DmSINHVIENDAP          dapSINHVIEN         = new DmSINHVIENDAP(dbContext);
            DmLOPHOCDAP            dapLOPHOCDAO        = new DmLOPHOCDAP(dbContext);
            THETHAO_SINHVIENDAP    dapTHETHAO_SINHVIEN = new THETHAO_SINHVIENDAP(dbContext);

            itemId = !string.IsNullOrEmpty(Request["itemid"]) ? Request["itemid"].ToString() : "";
            if (itemId.Length > 0)
            {
                objSINHVIEN = dapSINHVIEN.GetById(itemId);
            }
            ;
            objLOPHOC.AddRange(dapLOPHOCDAO.getListAll());
            lstTHETHAO_SINHVIEN = dapTHETHAO_SINHVIEN.GetById(itemId);

            if (lstTHETHAO_SINHVIEN.Count() > 0)
            {
                foreach (var itemTT in lstTHETHAO_SINHVIEN)
                {
                    lstTHETHAO += itemTT.TENTHETHAO + " ,";
                }
                lstTHETHAO = lstTHETHAO.Substring(0, lstTHETHAO.Length - 1);
            }
            else
            {
            }
        }
Ejemplo n.º 2
0
        public void Page_Load(object sender, EventArgs e)
        {
            dbContext           = new QUANLYSINHVIENEntities();
            dapSINHVIEN         = new DmSINHVIENDAP(dbContext);
            dapTHETHAO          = new DmTHETHAODAP(dbContext);
            dapLOPHOC           = new DmLOPHOCDAP(dbContext);
            dapDANGKYONSITE     = new DmDANGKYONSITEDAP();
            dapCHAMCONG         = new DmCHAMCONGDAP();
            dapTHETHAO_SINHVIEN = new THETHAO_SINHVIENDAP(dbContext);
            doAction            = string.IsNullOrEmpty(Request["do"]) ? "" : Request["do"].ToLower();
            itemId        = Request["ItemId"];
            searchDanhMuc = Request["selectSearch"];
            search        = Request["inputSearch"];

            switch (doAction)
            {
            case "add":
                Add();
                break;

            case "delete":
                Delete();
                break;

            case "edit":
                Edit();
                break;

            case "exportword":
                ExportWord();
                break;

            case "exportwordtable":
                ExportWordTable();
                break;

            case "exportexceltable":
                ExportExcel();
                break;

            case "exportexcelbm":
                ExportExcelBm();
                break;

            case "exportexcelcc":
                ExportExcelCC();
                break;

            case "importexcel":
                ImportExcel();
                break;

            case "loaddata":
                LoadGridData();
                break;
            }
            RenderMessage(jMessage);
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            QUANLYSINHVIENEntities dbContext           = new QUANLYSINHVIENEntities();
            DmSINHVIENDAP          dapSINHVIENDAO      = new DmSINHVIENDAP(dbContext);
            DmLOPHOCDAP            dapLOPHOCDAO        = new DmLOPHOCDAP(dbContext);
            DmTHETHAODAP           dapTHETHAODAP       = new DmTHETHAODAP(dbContext);
            THETHAO_SINHVIENDAP    dapTHETHAO_SINHVIEN = new THETHAO_SINHVIENDAP(dbContext);

            doAction = !string.IsNullOrEmpty(Request["do"]) ? Request["do"].ToString() : "";
            itemId   = !string.IsNullOrEmpty(Request["itemid"]) ? Request["itemid"].ToString() : "";
            if (itemId.Length > 0)
            {
                objSINHVIEN = dapSINHVIENDAO.GetById(itemId);
            }
            objLOPHOC.AddRange(dapLOPHOCDAO.getListAll());
            objTHETHAO.AddRange(dapTHETHAODAP.GetListAll());
            lstTHETHAO_SINHVIEN = dapTHETHAO_SINHVIEN.GetById(itemId);
            lstMONTHETHAO       = lstTHETHAO_SINHVIEN.Select(x => x.THETHAOID).ToList();
        }