예제 #1
0
    protected void BindDropDownStudent()
    {
        SchoolName = ObjccWeb.ReturnSingleValue("select SchoolName1 from MTClientCompany");
        if (ObjccWeb.ReturnNumericValue("Select UserTypeID from MTUserMaster Where UID=" + Session["UID"] + "") == 3)
        {
            ObjccWeb.FillDDLs(ddlStudent, "Select Distinct SM.StudentID As StudentID,FirstName From SIStudentMaster SM Inner Join SIStudentYearWiseDetails SYD on SYD.StudentID=SM.StudentID where " +
                              "ParentID=" + Session["ParentID"] + " AND StudentStatus='S' order by SM.StudentID", "StudentID", "Firstname", "");

            ObjccWeb.FillDDLs(ddlAcademic, "SELECT SYD.AcaStart AS AcaStart,CAST(SYD.AcaStart AS VARCHAR)+' - '+CAST(SYD.AcaStart+1 AS VARCHAR) AS AcademicSession From SIStudentYearwiseDetails SYD INNER JOIN MTAcademicSessionMaster ASM ON ASM.AcaStart=SYD.AcaStart" +
                              " WHERE SYD.AcaStart<>0 and StudentID=" + Session["StudentID"] + " AND ShowFlag='Y' ORDER BY SYD.AcaStart DESC", "AcaStart", "AcademicSession", "");
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ip = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).GetValue(0).ToString();

        System.Web.HttpBrowserCapabilities browser = Request.Browser;
        ((Button)Login1.FindControl("loginButton")).Enabled = true;
        hidBrsr.Value = "";
        hidBrsr.Value = "Type = " + browser.Type + "\n"
                        + "Name = " + browser.Browser + "\n"
                        + "Version = " + browser.Version + "\n"
                        + "Major Version = " + browser.MajorVersion + "\n"
                        + "Minor Version = " + browser.MinorVersion + "\n"
                        + "Platform = " + browser.Platform + "\n"
                        + "Is Beta = " + browser.Beta + "\n"
                        + "Is Crawler = " + browser.Crawler + "\n"
                        + "Is AOL = " + browser.AOL + "\n"
                        + "Is Win16 = " + browser.Win16 + "\n"
                        + "Is Wind32 = " + browser.Win32 + "\n"
                        + "Support JavaScript = " + browser.EcmaScriptVersion.ToString() + "\n"
                        + "Support JavaScript Verion = " + browser["JavaScriptVersion"] + "";

        brsrCheck();
        if (!IsPostBack)
        {
            if (Session["UID"] != null)
            {
                Session.Clear();
            }
            ((TextBox)Login1.FindControl("UserName")).Focus();
            ((TextBox)Login1.FindControl("UserName")).Attributes.Add("onpaste", "javascript:return false;");
            ((TextBox)Login1.FindControl("Password")).Attributes.Add("onpaste", "javascript:return false;");
            // ((TextBox)Login1.FindControl("txtCapText")).Attributes.Add("onpaste", "javascript:return false;");
            ((TextBox)Login1.FindControl("UserName")).Attributes.Add("AutoComplete", "off");
            ((TextBox)Login1.FindControl("Password")).Attributes.Add("AutoComplete", "off");
            // ((TextBox)Login1.FindControl("txtCapText")).Attributes.Add("AutoComplete", "off");

            objCCWeb.FillDDLs(((DropDownList)Login1.FindControl("ddlAcademicYear")), "SELECT AcaStart AS AcaStart,CAST(AcaStart AS VARCHAR)+' - '+CAST(AcaStart+1 AS VARCHAR) AS AcademicSession" +
                              " FROM MTAcademicSessionMaster WHERE AcaStart<>0 ORDER BY AcaStart DESC", "AcaStart", "AcademicSession", "");
            string strAcaStart = objCCWeb.ReturnSingleValue("SELECT AcaStart FROM MTAcademicSessionMaster WHERE AcaEndDate>=CONVERT(VARCHAR,GETDATE(),111) AND AcaStartDate<=CONVERT(VARCHAR,GETDATE(),111)");
            try
            {
                ((DropDownList)Login1.FindControl("ddlAcademicYear")).Items.FindByValue(strAcaStart).Selected = true;
            }
            catch
            {
            }
            //btnAbout.Attributes.Add("onmouseover", "javascript:return fMouseOver(this)");
            //btnAbout.Attributes.Add("onmouseout", "javascript:return fMouseOut(this)");
            hid.Value     = CreateSalt(6); //Creating a Salt and Sending to Client.
            hdnFlag.Value = "";
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UID"] == null)
        {
            Response.Write("<script>window.close();window.open('Logon.aspx','_parent');</script>");
            return;
        }
        GetMenuData();
        int intUserTypeID = objCCWeb.ReturnNumericValue("Select UserTypeiD From  MTUserMaster Where UID=" + Session["UID"] + " ");//AND UserTypeiD NOT in(0,1,4)

        if (intUserTypeID == 3 || intUserTypeID == 2)
        {
            Response.Write("<script>window.open('PlParentLoginForm.aspx','_parent');</script>");
            return;
        }
        if (intUserTypeID == 6)
        {
            string UserID = objCCWeb.ReturnSingleValue("Select Case when UserId like 'SE%' then 'SE' else 'SR' end as UserID  from MTUserMaster Where  UID=" + Session["UID"] + "  AND UserTypeID=6");

            if (UserID == "SE")
            {
                Response.Write("<script>window.open('SRStudentonlineRegistration11.aspx','_parent');</script>");
            }
            else
            {
                Response.Write("<script>window.open('SRStudentonlineRegistration.aspx','_parent');</script>");
            }
            return;
        }
        if (Request.QueryString["Flag"] != null)
        {
            string strQuery = "";
            if (Request.QueryString["Flag"] == "DisplayID")
            {
                strQuery = "Declare @VarMinMark as Varchar(2000);SET @VarMinMark='';  Select @VarMinMark=@VarMinMark+Cast (DisplayID  as varchar)+'^'from MTDisplayMaster  ORDER BY  DisplayID  " +
                           "  Select CASE WHEN LEN(@VarMinMark)>1 THEN SubString(@VarMinMark,1,LEN(@VarMinMark)-1) ELSE '0' END as MinMark";
            }
            if (Request.QueryString["Flag"] == "OutTime")
            {
                strQuery = "UPDATE MDUserLoginDetails SET LoggedOutTime=GETDATE() WHERE LoggedOutTime IS NULL AND SessionDetails='" + Session["UserLogin"] + "'";
            }

            string strResult = objCCWeb.ReturnSingleValue(strQuery);
            Response.Clear();
            Response.ContentType = "text/xml";
            Response.Write(strResult);
            Response.End();
        }
        if (!IsPostBack)
        {
            if (Session["CollegeName"] != null)
            {
                Session["CollegeName"] = Session["CollegeName"].ToString().Replace(" ", "&nbsp;");
            }
            else
            {
                Session["CollegeName"] = "Campus Care";
            }
            if (Session["EmployeeID"] == null)
            {
                lnkPortal.Visible = false;
            }
            Session["Date"] = DateTime.Now.Date.ToString("yyyy/MM/dd");

            lblDate.Text = DateTime.Now.Date.ToString("dd/MM/yyyy");
            lblDate.Style.Add("text-align", "right");
            //imgbtnExpand.Attributes.Add("onclick", "javascript:return fResize()");
            btnAbout.Attributes.Add("onmouseover", "javascript:return fMouseOver(this)");
            btnAbout.Attributes.Add("onmouseout", "javascript:return fMouseOut(this)");
            lblUser.Text         = "WELCOME " + Session["UserName"].ToString();
            DataList1.DataSource = objCCWeb.BindReader("EXEC  spBindCaption " + Session["SchoolID"] + "," + Session["AcaStart"] + ",'" + DateTime.Now.Date.ToString("yyyy/MM/dd") + "',1," + Session["UID"] + " ");
            DataList1.DataBind();
            objCCWeb.FillDDLs(ddlSession, "SELECT AcaStart AS AcaStart,CAST(AcaStart AS VARCHAR)+' - '+CAST(AcaStart+1 AS VARCHAR) AS AcademicSession" +
                              " FROM MTAcademicSessionMaster WHERE AcaStart<>0 ORDER BY AcaStart", "AcaStart", "AcademicSession", "");
            objCCWeb.FillDDLs(ddlSchools, "SELECT SchoolID,SchoolName1 AS SchoolName FROM MTClientCompany WHERE SchoolID IN (SELECT SchoolID FROM MTUserInstitutionMaster WHERE UID=" + Convert.ToInt32(Session["UID"]) + ") ORDER BY SchoolName1", "SchoolID", "SchoolName", "");
            if (ddlSchools.Items.Count > 0)
            {
                ddlSchools.Visible = true;
                string q = Session["SchoolID"].ToString();
                ddlSchools.SelectedValue = Session["SchoolID"].ToString();
                q = ddlSchools.SelectedItem.ToString();
            }
            else
            {
                ddlSchools.Visible = false;
            }


            if (ddlSession.Items.Count > 0)
            {
                ddlSession.Visible = true;
                string q = Session["AcaStart"].ToString();
                ddlSession.SelectedValue = Session["AcaStart"].ToString();
                q = ddlSession.SelectedItem.ToString();
            }
            else
            {
                ddlSession.Visible = false;
            }

            lblSchoolName.Text = Session["SchoolName"].ToString();
        }
    }
예제 #4
0
    //protected static string strHideID = " document.getElementById('trReportGroup').style.display='none';" +
    //    "if (document.getElementById('gvReportGroup')!=null){if (document.getElementById('gvReportGroup').rows.length>1) {for(var intForLoop=0;intForLoop<document.getElementById('gvReportGroup').rows.length;intForLoop++)" +
    //        " {  document.getElementById('gvReportGroup').rows[intForLoop].cells[1].style.display='none'; " +
    //       // " document.getElementById('gvReportGroup').rows[intForLoop].cells[4].style.display='none'; "  +
    //        "document.getElementById('divSelectDeSelect').style.display='none';}}}";

    //protected static string strHidepriority = "if(document.getElementById('gvReportGroup')!=null) " +
    //                               " if(document.getElementById('gvReportGroup').rows.length>1) " +
    //                               "  for(var varLoop= 0 ; varLoop<document.getElementById('gvReportGroup').rows.length;varLoop++) { " +
    //                               " document.getElementById('gvReportGroup').rows[varLoop].cells[5].style.display='none'; }";

    protected void Page_Load(object sender, EventArgs e)
    {
        //ClientScript.RegisterStartupScript(this.GetType(), "disScript", "<script language='javascript'>" + strHideID + "</script>");
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetNoStore();
        Response.AddHeader("Cache-control", "no-store,must-revalidate,private,no-cache,no-store,pre-check=0,post-check=0,max-stale=0");
        Response.AddHeader("Pragma", "no-cache");
        Response.AddHeader("Expires", "0");

        if (Session["UID"] == null || Session["SchoolID"] == null)
        {
            Response.Write("<script>window.close();window.open('Logon.aspx','_Parent');</script>");
            return;
        }

        if ((objCCWeb.ReturnNumericValue("SELECT Count(*) FROM MTUserLimitMaster WHERE UID=" + Session["UID"] + " AND ModuleID=1 AND MenuName='mnuReportGroupMaster'") == 0) || (objCCWeb.ReturnSingleValue("SELECT ISNULL(VisibleOption,'N') FROM MTUserLimitMaster WHERE UID=" + Session["UID"] + " AND ModuleID=1 AND MenuName='mnuReportGroupMaster'") == "N"))
        {
            Session.Clear();
            Response.Redirect("Logon.aspx");
            return;
        }
        if (objCCWeb.pCheckText(frmReportGroupMaster) == true)
        {
            Response.Write("<script>window.close();window.open('Logon.aspx','_Parent');</script>");
            return;
        }
        if ((Session["Type"] == null) || (Session["Type"].ToString() == "1"))
        {
            strType = "ltr";
        }
        else
        {
            strType = "rtl";
            pnlClassSection.HorizontalAlign = HorizontalAlign.Right;
        }
        if (!IsPostBack)
        {
            hidCache.Value = "";
            pGetOption();
            gvReportGroup.Attributes.Add("bordercolor", "#FFC1A4");
            txtReportGroupName1.Attributes.Add("onkeypress", "javascript:return Restrict_Name(event)");
            txtReportGroupName2.Attributes.Add("onkeypress", "javascript:return Restrict_NameArabic(event)");
            txtpriority.Attributes.Add("onkeypress", "javascript:return Restrict_Priority(event)");
            txtReportGroupName2.Style.Add("text-align", "right");
            txtReportGroupName1.Attributes.Add("AutoComplete", "off");
            txtReportGroupName2.Attributes.Add("AutoComplete", "off");
            gvReportGroup.Attributes.Add("onkeypress", "javascript:return searchName(event,'gvReportGroup',2)");
            objCCWeb.FillDDLs(ddlModuleID, "SELECT 0 AS ModuleID,'' AS ModuleName" + Session["Type"] + " UNION Select Distinct MTRM.ModuleID,MTUMM.ModuleNAME From MTReportMaster MTRM Inner JOIN MTUserModuleMaster MTUMM ON MTRM.ModuleID=MTUMM.ModuleID  WHERE MTRM.ModuleID>'0'  ORDER BY ModuleID ", "ModuleID", "ModuleName" + Session["Type"].ToString() + "", "");

            //objCCWeb.FillCheckedBoxList(chkReportName, "SELECT ReportID,ReportName" + Session["Type"] + " FROM MTReportMaster WHERE ReportID>0 ORDER BY ReportID, ReportName" + Session["Type"] + " ", "ReportID", "ReportName" + Session["Type"].ToString() + "", "");

            btnCancel_Click(sender, e);

            //pDisplayType();
            gvReportGroup.EmptyDataText = objCCWeb.pDisplayMessage("" + Session["Type"].ToString() + "", "1023", "");
            btnSelectAll.Attributes.Add("onclick", "javascript:return fClassSubject(1);");
            btnDeSelect.Attributes.Add("onclick", "javascript:return fClassSubject(0);");
            chkReportName.Attributes.Add("oncontextmenu", "javascript:return fSelectDeSelect(event)");
            if (ddlModuleID.Items.Count > 0)
            {
                ddlModuleID.Items[0].Text = objCCWeb.pDisplayMessage("" + Session["Type"].ToString() + "", "6", lblReportModuleID.Text);
            }

            ClientScript.RegisterStartupScript(this.GetType(), "DisplayScript", "<script language='javascript'>" + strHideID + "</script>");
            chkReportName.Items.Add(new ListItem("", ""));
        }
    }