Ejemplo n.º 1
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            ddlCourse1.DataSource     = tbl1;
            ddlCourse1.DataTextField  = "SubjectName";
            ddlCourse1.DataValueField = "SubjectID";
            ddlCourse1.DataBind();

            ddlCourse2.DataSource     = tbl1;
            ddlCourse2.DataTextField  = "SubjectName";
            ddlCourse2.DataValueField = "SubjectID";
            ddlCourse2.DataBind();

            ddlCourse3.DataSource     = tbl1;
            ddlCourse3.DataTextField  = "SubjectName";
            ddlCourse3.DataValueField = "SubjectID";
            ddlCourse3.DataBind();

            ddlCourse4.DataSource     = tbl1;
            ddlCourse4.DataTextField  = "SubjectName";
            ddlCourse4.DataValueField = "SubjectID";
            ddlCourse4.DataBind();
            ddlCourse1.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse2.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse3.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
            ddlCourse4.Items.Insert(0, new ListItem("<اختر مادة>", "0"));
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "";

            string Data = labDate.Text.ToString() + txtYear.Text.ToString();

            if (fuSignatureStudent.HasFile)
            {
                string Private = fuSignatureStudent.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + fuSignatureStudent.FileName.ToString();
                fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.FileName);
                SignatureStudents newSig  = new SignatureStudents();
                string            Pasword = txtPassSign.Text.ToString();

                string strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }

            if (Result == true)
            {
                int    row      = Convert.ToInt32(Request.QueryString["id"]);
                string Reason   = "";
                string year     = "";
                string semester = "";
                if (txtStatus.Text != string.Empty)
                {
                    Reason = txtStatus.Text.ToString();
                }
                if (txtYear.Text != string.Empty)
                {
                    year = txtYear.Text.ToString();
                }
                if (ddlSemester.SelectedIndex != 0 && ddlSemester.SelectedIndex != -1)
                {
                    semester = ddlSemester.Text.ToString();
                }
                DelaySemesterClass obj         = new DelaySemesterClass();
                string             Datenow     = labDate.Text.ToString();
                NowTimeUniversity  timee       = new NowTimeUniversity();
                DataRow            T           = timee.drSearchYearANdSemester();
                string             nowsemester = T["NowSemester"].ToString();
                string             nowYear     = T["NowYear"].ToString();
                if (obj.UpdateDelaySemester(row, ID, nowYear, nowsemester, year, semester, Reason, Datenow) == 1)
                {
                    txtStatus.Text            = "";
                    ddlSemester.SelectedIndex = 0;
                    txtYear.Text = "";
                    SentMail s = new SentMail();
                    s.sendemailReg();
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = " التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
Ejemplo n.º 3
0
        private void fillddl()
        {
            int ID = Convert.ToInt32(Session["ID"].ToString());
            RegistredCourses  obj      = new RegistredCourses();
            NowTimeUniversity timee    = new NowTimeUniversity();
            DataRow           T        = timee.drSearchYearANdSemester();
            string            year     = T["NowYear"].ToString();
            string            Semester = T["NowSemester"].ToString();
            DataTable         tbl1     = obj.dtSearchRegisterSubject(ID, year, Semester);

            gvCourses.DataSource = tbl1;
            gvCourses.DataBind();
        }
Ejemplo n.º 4
0
    public DataTable dtNotAcceptHeadShowStatusApplication(int SectionID)
    {
        NowTimeUniversity timee      = new NowTimeUniversity();
        DataRow           T          = timee.drSearchYearANdSemester();
        string            semester   = T["NowSemester"].ToString();
        string            Year       = T["NowYear"].ToString();
        SqlConnection     Connection = new SqlConnection(Connectionstring);

        Connection.Open();
        DataTable      dt = new DataTable();
        SqlDataAdapter DA = new SqlDataAdapter("select  Students.UniversityID as UniversityID , Students.StudentName as StudentName,Section.Name as SectionName ,ShowStatus.Date as DateRequest ,ShowStatus.ID  as IDFORM from Students,Section,ShowStatus where Students.SectionID=" + SectionID + " and Section.ID=Students.SectionID and Students.ID=ShowStatus.StudentID and(ShowStatus.HeadAccept = 0 OR ShowStatus.HeadAccept IS null)and ShowStatus.Year=" + Year + " and semester=N" + "'" + semester + "'", Connection);

        DA.Fill(dt);
        Connection.Close();
        return(dt);
    }
Ejemplo n.º 5
0
    public DataTable dtNotAcceptRegPullCourseApplication()
    {
        NowTimeUniversity timee      = new NowTimeUniversity();
        DataRow           T          = timee.drSearchYearANdSemester();
        string            semester   = T["NowSemester"].ToString();
        string            Year       = T["NowYear"].ToString();
        SqlConnection     Connection = new SqlConnection(Connectionstring);

        Connection.Open();
        DataTable      dt = new DataTable();
        SqlDataAdapter DA = new SqlDataAdapter("select  Students.UniversityID as UniversityID , Students.StudentName as StudentName,Section.Name as SectionName ,PullCourse.Date as DateRequest ,PullCourse.ID  as IDFORM from Students,Section,PullCourse where Students.SectionID=Section.ID and Students.ID=PullCourse.StudentID and(( PullCourse.DeanAccept<>0 and PullCourse.DeanAccept IS not null) and (PullCourse.RegestrationAccept = 0 OR PullCourse.RegestrationAccept IS null))and PullCourse.Year=" + Year + " and PullCourse.Semester=N" + "'" + semester + "'", Connection);

        DA.Fill(dt);
        Connection.Close();
        return(dt);
    }
Ejemplo n.º 6
0
    /// Head getData Application
    public DataTable dtViewStudents(int ID)
    {
        NowTimeUniversity timee      = new NowTimeUniversity();
        DataRow           T          = timee.drSearchYearANdSemester();
        string            semester   = T["NowSemester"].ToString();
        string            Year       = T["NowYear"].ToString();
        SqlConnection     Connection = new SqlConnection(Connectionstring);

        Connection.Open();
        DataTable      dt = new DataTable();
        SqlDataAdapter DA = new SqlDataAdapter("select * from PullCourse where Year=" + Year + " and Semester=N" + "'" + semester + "'" + " and StudentID = " + ID, Connection);

        DA.Fill(dt);
        Connection.Close();
        return(dt);
    }
Ejemplo n.º 7
0
    public DataTable dtNotAcceptDeanDropSemesterApplication(int CollegeID)
    {
        NowTimeUniversity timee      = new NowTimeUniversity();
        DataRow           T          = timee.drSearchYearANdSemester();
        string            semester   = T["NowSemester"].ToString();
        string            Year       = T["NowYear"].ToString();
        SqlConnection     Connection = new SqlConnection(Connectionstring);

        Connection.Open();
        DataTable      dt = new DataTable();
        SqlDataAdapter DA = new SqlDataAdapter("select  Students.UniversityID as UniversityID , Students.StudentName as StudentName,Section.Name as SectionName ,DropSemester.Date as DateRequest ,DropSemester.ID  as IDFORM from Students,Section,DropSemester where Students.SectionID=Section.ID and Section.CollegeID=" + CollegeID + " and Students.ID=DropSemester.StudentID and ((DropSemester.HeadAccept <> 0 and DropSemester.HeadAccept IS NOT null) and (DropSemester.DeanAccept = 0 OR DropSemester.DeanAccept IS null))and DropSemester.Year=" + Year + " and DropSemester.Semester=N" + "'" + semester + "'", Connection);

        DA.Fill(dt);
        Connection.Close();
        return(dt);
    }
Ejemplo n.º 8
0
 protected void btnSaveDean_Click(object sender, EventArgs e)
 {
     if (txtYear.Text.ToString() != "" && ddlSemester.SelectedIndex != 0 && ddlSemester.SelectedIndex != -1)
     {
         string            semester = ddlSemester.SelectedItem.ToString();
         int               year     = Convert.ToInt32(txtYear.Text.ToString());
         NowTimeUniversity time     = new NowTimeUniversity();
         if (time.UpdateTime(year, semester) == 1)
         {
             ddlSemester.SelectedIndex = 0;
             txtYear.Text = "";
         }
     }
     else
     {
         string snackbarScript = GenerateSnackbarJS();
         Snack.Text = "Here's the snackbar";
         ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "snackbar", snackbarScript, true);
     }
 }
Ejemplo n.º 9
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"]);
            string Path   = "";

            string Data = DateTime.Today.ToString() + txtNumHours.Text.ToString();

            if (fuSignature.HasFile)
            {
                string Private = fuSignature.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private;
                string Pasword = txtPassSign.Text.ToString();
                fuSignature.SaveAs(Server.MapPath("Test") + "/" + fuSignature.FileName);
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }
            if (Result == true)
            {
                string            date1     = DateTime.Today.ToString();
                string            Reason    = txtReasons.Text.ToString();
                DropSemester      objsem    = new DropSemester();
                int               NumOFHour = Convert.ToInt32(txtNumHours.Text.ToString());
                int               roww      = Convert.ToInt32(Request.QueryString["id"]);
                NowTimeUniversity timee     = new NowTimeUniversity();
                DataRow           T         = timee.drSearchYearANdSemester();
                string            year      = T["NowYear"].ToString();
                string            Semester  = T["NowSemester"].ToString();
                if (objsem.UpdateDropSemester(roww, ID, year, Semester, Reason, NumOFHour, date1, "", 0, "", 0, "", 0, "", 0, 0, "", 2) == 1)
                {
                    Response.Redirect("DropSemesterDisplay.aspx");
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }
Ejemplo n.º 10
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool Result = false;
            //Define Avariable
            int    CourseNum1            = 0;
            int    AlternativeCourseNum1 = 0;
            string TypeCouseNum1         = "";
            string Reason = "";
            int    row    = Convert.ToInt32(Request.QueryString["id"]);

            int    ID   = Convert.ToInt32(Session["ID"].ToString());
            string Path = "";

            string Data = txtNumberCourse1.Text.ToString() + txtAlternativeNum1C1.Text.ToString() +
                          labHoursCourse1.Text.ToString() + labHoursAlternative.Text.ToString();

            if (fuSignature.HasFile)
            {
                string Private = fuSignature.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private;
                string Pasword = txtPassSign.Text.ToString();
                fuSignature.SaveAs(Server.MapPath("Test") + "/" + fuSignature.FileName);
                //  Path = "/Test/" + fuSignatureStudent.FileName;
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }

            if (Result == true)
            {
                //Check input Data
                if (txtNumberCourse1.Text != String.Empty)
                {
                    CourseNum1 = Convert.ToInt32(txtNumberCourse1.Text.ToString());
                }

                if (txtAlternativeNum1C1.Text != String.Empty)
                {
                    AlternativeCourseNum1 = Convert.ToInt32(txtAlternativeNum1C1.Text.ToString());
                }
                if (labTypeCourse1.Text != String.Empty)
                {
                    TypeCouseNum1 = labTypeCourse1.Text.ToString();
                }

                if (txtReason.Text != String.Empty)
                {
                    Reason = txtReason.Text.ToString();
                }
                AlternativeSub    obj      = new AlternativeSub();
                NowTimeUniversity timee    = new NowTimeUniversity();
                DataRow           T        = timee.drSearchYearANdSemester();
                string            semester = T["NowSemester"].ToString();
                string            Year     = T["NowYear"].ToString();
                string            Date1    = labDate.Text.ToString();
                if (obj.UpdateAlternativeSubject(row, ID, Year, semester, Date1, CourseNum1, TypeCouseNum1, AlternativeCourseNum1, Reason) == 1)
                {
                    ddlCourse1.SelectedIndex            = -1;
                    ddlAlternativeCourse1.SelectedIndex = -1;
                    txtReason.Text = "";
                    ddlAlternativeCourse1.SelectedIndex = -1;
                    txtAlternativeNum1C1.Text           = "";
                    txtNumberCourse1.Text    = "";
                    labTypeCourse1.Text      = "";
                    labHoursCourse1.Text     = "";
                    labHoursAlternative.Text = "";
                    SentMail s = new SentMail();
                    s.sendemailAcadimic(ID);
                }
                errorLabel.Visible = false;
            }
            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ أو كلمة المرور";
                errorLabel.Visible = true;
            }
        }
Ejemplo n.º 11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool Result = false;


            int    ID   = Convert.ToInt32(Session["ID"].ToString());
            string Path = "";
            string Data = labNumberStudent.Text.ToString() + txtCourseNum1.Text.ToString() + txtCourseNum2.Text.ToString() +
                          txtCourseNum3.Text.ToString() + txtCourseNum4.Text.ToString() + txtDateCourse1.Text.ToString() + txtDateCourse2.Text.ToString() + txtDateCourse3.Text.ToString()
                          + txtDateCourse4.Text.ToString();

            if (fuSignatureStudent.HasFile)
            {
                string Private = fuSignatureStudent.FileName.ToString();
                Path = System.Web.HttpContext.Current.Server.MapPath("Test") + "/" + Private;
                string Pasword = txtPassSign.Text.ToString();
                fuSignatureStudent.SaveAs(Server.MapPath("Test") + "/" + fuSignatureStudent.FileName);
                SignatureStudents newSig     = new SignatureStudents();
                string            strencrypt = newSig.encrypet(Data, Path, Pasword);
                Result = newSig.Decreypt(strencrypt, ID);
            }

            if (Result == true)
            {
                int row = Convert.ToInt32(Request.QueryString["id"]);

                int CourseNum1 = 0;
                int CourseNum2 = 0;
                int CourseNum3 = 0;
                int CourseNum4 = 0;

                if (txtCourseNum1.Text != string.Empty)
                {
                    CourseNum1 = Convert.ToInt32(txtCourseNum1.Text.ToString());
                }

                if (txtCourseNum2.Text != string.Empty)
                {
                    CourseNum2 = Convert.ToInt32(txtCourseNum2.Text.ToString());
                }

                if (txtCourseNum3.Text != string.Empty)
                {
                    CourseNum3 = Convert.ToInt32(txtCourseNum3.Text.ToString());
                }

                if (txtCourseNum4.Text != string.Empty)
                {
                    CourseNum4 = Convert.ToInt32(txtCourseNum4.Text.ToString());
                }

                string ExamCourse1Date = txtDateCourse1.Text.ToString();

                string ExamCourse2Date = txtDateCourse2.Text.ToString();
                string ExamCourse3Date = txtDateCourse3.Text.ToString();
                string ExamCourse4Date = txtDateCourse4.Text.ToString();

                string Reason = txtReason.Text.ToString();

                string strReasonFile  = "";
                string strReasonFile2 = "";
                if (fuDetiels1.HasFile)
                {
                    strReasonFile = fuDetiels1.FileName.ToString();
                    fuDetiels1.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels1.FileName);
                }

                if (fuDetiels2.HasFile)
                {
                    strReasonFile2 = fuDetiels2.FileName.ToString();

                    fuDetiels2.SaveAs(Server.MapPath("../UploadFiles") + "/" + fuDetiels2.FileName);
                }
                string      date  = labDate.Text.ToString();
                AbsenceExam obj11 = new AbsenceExam();

                NowTimeUniversity timee    = new NowTimeUniversity();
                DataRow           T        = timee.drSearchYearANdSemester();
                string            semester = T["NowSemester"].ToString();
                string            Year     = T["NowYear"].ToString();

                if (obj11.UpdateAbsenceExam(row, ID, date, Year, semester, CourseNum1, ExamCourse1Date, CourseNum2, ExamCourse2Date, CourseNum3, ExamCourse3Date, CourseNum4, ExamCourse4Date, Reason, strReasonFile, strReasonFile2, 1) == 1)
                {
                    txtReason.Text           = "";
                    txtCourseNum1.Text       = "";
                    ddlCourse1.SelectedIndex = -1;
                    ddlCourse2.SelectedIndex = -1;
                    ddlCourse3.SelectedIndex = -1;
                    ddlCourse4.SelectedIndex = -1;
                    labTeacher1.Text         = "";
                    labTeacher2.Text         = "";
                    labTeacher3.Text         = "";
                    labTeacher4.Text         = "";

                    SentMail s = new SentMail();
                    s.sendemailDean(ID);
                }
                errorLabel.Visible = false;
            }



            else
            {
                errorLabel.Text    = "التوقيع المدخل خاطئ";
                errorLabel.Visible = true;
            }
        }