private void filldata(int ID)
        {
            DelaySemesterClass obj = new DelaySemesterClass();
            int     id             = Convert.ToInt32(Request.QueryString["id"]);
            DataRow dr             = obj.drgetform(id);

            if (dr != null)
            {
                int      STUid  = Convert.ToInt32(dr["StudentID"].ToString());
                Studnets objStu = new Studnets();
                DataRow  Stu    = objStu.drSearchStudent(STUid);
                if (Stu != null)
                {
                    labStudentName.Text   = Stu["StudentName"].ToString();
                    labStudentNumber.Text = Stu["UniversityID"].ToString();
                    labSection.Text       = Stu["SectionName"].ToString();
                    labCollage.Text       = Stu["CollageName"].ToString();
                    labMager.Text         = Stu["mager"].ToString();
                }

                txtStatus.Text            = dr["Description"].ToString();
                labDate.Text              = dr["Date"].ToString();
                ddlSemester.SelectedValue = dr["Semester"].ToString();
                txtYear.Text              = dr["Year"].ToString();
            }
        }
Beispiel #2
0
        private void fillData()
        {
            DelaySemesterClass obj = new DelaySemesterClass();
            int     id             = Convert.ToInt32(Request.QueryString["id"]);
            DataRow dr             = obj.drgetform(id);

            if (dr != null)
            {
                int      STUid  = Convert.ToInt32(dr["StudentID"].ToString());
                Studnets objStu = new Studnets();
                DataRow  Stu    = objStu.drSearchStudent(STUid);
                if (Stu != null)
                {
                    labStudentName.Text   = Stu["StudentName"].ToString();
                    labStudentNumber.Text = Stu["UniversityID"].ToString();
                    labSection.Text       = Stu["SectionName"].ToString();
                    labCollage.Text       = Stu["CollageName"].ToString();
                    labMager.Text         = Stu["mager"].ToString();
                }
                labDateReg.Text = DateTime.UtcNow.ToString("yyyy-MM-dd");
                txtStatus.Text  = dr["Description"].ToString();
                labDate.Text    = dr["Date"].ToString();
                ddlSemester.Items.Insert(0, new ListItem(dr["Semester"].ToString(), "0"));
                txtYear.Text = dr["Year"].ToString();
            }
        }
Beispiel #3
0
        private void fillData()
        {
            DelaySemesterClass obj = new DelaySemesterClass();
            int     id             = Convert.ToInt32(Request.QueryString["id"]);
            DataRow dr             = obj.drgetform(id);

            if (dr != null)
            {
                int      STUid  = Convert.ToInt32(dr["StudentID"].ToString());
                Studnets objStu = new Studnets();
                DataRow  Stu    = objStu.drSearchStudent(STUid);
                if (Stu != null)
                {
                    labStudentName.Text   = Stu["StudentName"].ToString();
                    labStudentNumber.Text = Stu["UniversityID"].ToString();
                    labSection.Text       = Stu["SectionName"].ToString();
                    labCollage.Text       = Stu["CollageName"].ToString();
                    labMager.Text         = Stu["mager"].ToString();
                }
                txtStatus.Text = dr["Description"].ToString();
                labDate.Text   = dr["Date"].ToString();
                ddlSemester.Items.Insert(0, new ListItem(dr["Semester"].ToString(), "0"));
                txtYear.Text            = dr["Year"].ToString();
                txtDescriptionReg.Text  = dr["RegestrationDescr"].ToString();
                txtDescriptionDean.Text = dr["DeanDescription"].ToString();
                string Reg = dr["RegestrationAccept"].ToString();
                if (Reg == "1")
                {
                    rbtAcceptRegistration.SelectedValue = "1";
                }
                else if (Reg == "2")
                {
                    rbtAcceptRegistration.SelectedValue = "2";
                }
                string Dean = dr["DeanAccept"].ToString();
                if (Dean == "1")
                {
                    rbtAcceptDean.SelectedValue = "1";
                }
                else if (Dean == "2")
                {
                    rbtAcceptDean.SelectedValue = "2";
                }
            }
        }
Beispiel #4
0
        protected void btnSaveReg_Click(object sender, EventArgs e)
        {
            bool   Result = false;
            int    ID     = Convert.ToInt32(Session["ID"].ToString());
            string Path   = "";
            string Data   = labDate.Text.ToString() + txtYear.Text.ToString() + rbtAcceptRegistration.SelectedValue.ToString();

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

            if (Result == true)
            {
                DelaySemesterClass obj = new DelaySemesterClass();
                int    id                = Convert.ToInt32(Request.QueryString["id"]);
                int    Acceptreg         = Convert.ToInt32(rbtAcceptRegistration.SelectedValue.ToString());
                string RegestrationDescr = txtDescriptionReg.Text.ToString();
                if (obj.AcceptRegDelaySemester(id, Acceptreg, RegestrationDescr) == 1)
                {
                    DataRow dr    = obj.drgetform(id);
                    int     STUid = Convert.ToInt32(dr["StudentID"].ToString());

                    SentMail s = new SentMail();
                    s.sendemailDean(STUid);
                    Response.Redirect("ProcessRequest.aspx");
                }

                errorReg.Visible = false;
            }
            else
            {
                errorReg.Text    = "التوقيع المدخل خاطئ او كلمة المرور";
                errorReg.Visible = true;
            }
        }