コード例 #1
0
 protected void displaygyearGrid(DsPSMS.ST_STUDENT_DATADataTable studentgyear)
 {
     if (studentgyear != null)
     {
         GridView1.DataSource = studentgyear;
         GridView1.DataBind();
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            imgSchool.ImageUrl      = "~/Images/school.png";
            stdInfo.ImageUrl        = "~/Images/student.png";
            attendanceInfo.ImageUrl = "~/Images/attendance.jpg";
            examInfo.ImageUrl       = "~/Images/exam.png";
            teacherInfo.ImageUrl    = "~/Images/teacher.png";
            system.ImageUrl         = "~/Images/system.jpg";
            picturebox.ImageUrl     = "~/Images/school.jpg";

            DsPSMS.ST_STUDENT_DATARow studetail = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
            if (Session["EDU_YEAR"] != null)
            {
                studetail.EDU_YEAR = (string)(Session["EDU_YEAR"] ?? " ");
            }

            if (Session["STUDENT_ID"] != null)
            {
                studetail.STUDENT_ID = (string)(Session["STUDENT_ID"] ?? " ");
            }


            if (Session["STUDENT_NAME"] != null)
            {
                studetail.STUDENT_NAME = (string)(Session["STUDENT_NAME"] ?? " ");
            }

            if (Session["GRADE_ID"] != null)
            {
                studetail.GRADE_ID = (string)(Session["GRADE_ID"] ?? " ");
            }

            studetail = stuservice.searchIdNaEdGd(studetail);

            if (studetail != null)
            {
                lblClass.Text  = studetail.EDU_YEAR;
                lblID.Text     = studetail.STUDENT_ID;
                lblName.Text   = studetail.STUDENT_NAME;
                lblRoll.Text   = studetail.ROLL_NO;
                lblGender.Text = studetail.GENDER;
                lbldob.Text    = studetail.DOB;
                //picturebox.Text = studetail.PHOTO_PATH;
                picturebox.ImageUrl = "~/Images/" + studetail.PHOTO_PATH;
                lblPhone.Text       = studetail.PHONE;
                lblNrc.Text         = studetail.NRC_NO;
                lblPwd.Text         = studetail.PASSWORD;
                lblGrade.Text       = studetail.GRADE_ID;
                lblRoom.Text        = studetail.ROOM_ID;
                lblFather.Text      = studetail.FATHER_NAME;
                lblMother.Text      = studetail.MOTHER_NAME;
                lblAddress.Text     = studetail.ADDRESS;
                lblCphone.Text      = studetail.CONTACT_PHONE;
                lblEmail.Text       = studetail.EMAIL;
                lblCashtype.Text    = studetail.CASH_TYPE1;
                lblCashMonth.Text   = studetail.CASH_TYPE2;
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;
            //imgSchool.ImageUrl = "~/Images/school.png";
            stdInfo.ImageUrl        = "~/Images/student.png";
            attendanceInfo.ImageUrl = "~/Images/attendance.jpg";
            examInfo.ImageUrl       = "~/Images/exam.png";
            teacherInfo.ImageUrl    = "~/Images/teacher.png";
            system.ImageUrl         = "~/Images/system.jpg";
            logoImage.ImageUrl      = "~/Images/logo1.png";

            DsPSMS.ST_GRADE_MSTDataTable grdDt = new DsPSMS.ST_GRADE_MSTDataTable();
            DsPSMS.ST_STUDENT_DATARow    stDr  = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
            DsPSMS.ST_GRADE_MSTRow       grdDr = new DsPSMS.ST_GRADE_MSTDataTable().NewST_GRADE_MSTRow();

            if (Session["USER_ID"] != null)
            {
                userId = (string)(Session["USER_ID"] ?? "  ");
            }

            if (Session["EDU_YEAR"] != null)
            {
                CoboYear.Text = (string)(Session["EDU_YEAR"] ?? "  ");
                stDr.EDU_YEAR = CoboYear.Text;
                Session.Remove("EDU_YEAR");
            }
            if (Session["STUDENT_ID"] != null)
            {
                TxtStudID.Text              = (string)(Session["STUDENT_ID"] ?? "  ");
                stDr.STUDENT_ID             = TxtStudID.Text;
                stDr                        = stuService.getStuName(stDr, out msg);
                TxtStuName.Text             = stDr.STUDENT_NAME;
                grdDr.GRADE_ID              = stDr.GRADE_ID;
                grdDt                       = grdSubService.selectGradeByID(grdDr, out msg);
                CoboGrade.SelectedItem.Text = stDr.GRADE_ID;

                CoboSelect_Change(sender, e);
                Session.Remove("STUDENT_ID");
            }
            if (Session["CASH_DATE"] != null)
            {
                cashDate.Text = (string)(Session["CASH_DATE"] ?? "  ");
                Session.Remove("CASH_DATE");
            }

            // binding grade to combo box
            grdDt = grdSubService.getAllGradeData(out msg);
            if (grdDt != null && grdDt.Rows.Count != 0)
            {
                CoboGrade.DataSource     = null;
                CoboGrade.DataSource     = grdDt;
                CoboGrade.DataTextField  = "GRADE_NAME";
                CoboGrade.DataValueField = "GRADE_ID";
                CoboGrade.DataBind();
            }
        }
コード例 #4
0
 protected void showgrid()
 {
     DsPSMS.ST_STUDENT_DATADataTable show = new DsPSMS.ST_STUDENT_DATADataTable();
     show = stuentry.getAllData(out msg);
     if (show != null && show.Rows.Count != 0)
     {
         GridView1.DataSource = show;
         GridView1.DataBind();
     }
 }
コード例 #5
0
        // select Student's name from ST_STUDENT_DATA table by STUDENT_ID and EDU_YEAR
        public DataSet.DsPSMS.ST_STUDENT_DATARow selectStuName(DataSet.DsPSMS.ST_STUDENT_DATARow dr)
        {
            DsPSMS.ST_STUDENT_DATADataTable stuDt = new DsPSMS.ST_STUDENT_DATADataTable();
            Open();
            string         query = "SELECT* FROM ST_STUDENT_DATA WHERE STUDENT_ID='" + dr.STUDENT_ID + "' AND EDU_YEAR='" + dr.EDU_YEAR + "'";
            SqlCommand     cmd   = new SqlCommand(query, conn);
            SqlDataAdapter da    = new SqlDataAdapter(cmd);

            da.Fill(stuDt);
            Close();
            return(stuDt[0]);
        }
コード例 #6
0
        public DataSet.DsPSMS.ST_STUDENT_DATADataTable selectIdNaEdGd(DataSet.DsPSMS.ST_STUDENT_DATARow dr)
        {
            DsPSMS.ST_STUDENT_DATADataTable gyearr = new DsPSMS.ST_STUDENT_DATADataTable();
            Open();
            string query = "SELECT * from ST_STUDENT_DATA WHERE STUDENT_ID='" + dr.STUDENT_ID + "' AND EDU_YEAR= '" + dr.EDU_YEAR + "' AND STUDENT_NAME='" + dr.STUDENT_NAME + "' AND GRADE_ID = '" + dr.GRADE_ID + "'";
            //string query = "SELECT * from ST_STUDENT_DATA WHERE GRADE_ID='" + gradeid + "' AND EDU_YEAR= '" + eduyearid + "'";
            SqlCommand     cmd = new SqlCommand(query, conn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);

            da.Fill(gyearr);
            Close();
            return(gyearr);
        }
コード例 #7
0
        public DataSet.DsPSMS.ST_STUDENT_DATADataTable selectgyear(string grade, string eduyear)
        {
            DsPSMS.ST_STUDENT_DATADataTable gyearr = new DsPSMS.ST_STUDENT_DATADataTable();
            Open();
            string query = "SELECT * from ST_STUDENT_DATA WHERE GRADE_ID='" + grade + "' AND EDU_YEAR= '" + eduyear + "'";

            SqlCommand     cmd = new SqlCommand(query, conn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);

            da.Fill(gyearr);
            Close();
            return(gyearr);
        }
コード例 #8
0
        public DataSet.DsPSMS.ST_STUDENT_DATADataTable selectngyear(string name, string gradeid, string eduyearid)
        {
            DsPSMS.ST_STUDENT_DATADataTable nagyearr = new DsPSMS.ST_STUDENT_DATADataTable();
            Open();
            string query = "SELECT * from ST_STUDENT_DATA WHERE GRADE_ID='" + gradeid + "' AND EDU_YEAR= '" + eduyearid + "' AND STUDENT_NAME Like'" + name + "%'";

            SqlCommand     cmd = new SqlCommand(query, conn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);

            da.Fill(nagyearr);
            Close();
            return(nagyearr);
        }
コード例 #9
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_DATARow sturowdelete = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
            if (GridView1.SelectedIndex < 0)
            {
                showerror.Text = "Please select the record that you want to delete";
            }
            else
            {
                sturowdelete.STUDENT_ID = GridView1.SelectedRow.Cells[1].Text;

                stuentry.removedata(sturowdelete, out msg);
                DataTable ds = new DataTable();
                ds = null;
                GridView1.DataSource = ds;
                GridView1.DataBind();
                showgrid();
            }
        }
コード例 #10
0
        protected void CoboSelect_Change(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_DATARow stDr = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();

            if (TxtStudID.Text.Trim().Length != 0 && TxtStuName.Text.Trim().Length != 0 && CoboGrade.SelectedItem.Text.Trim().Length != 0 && CoboYear.Text.Trim().Length != 0)
            {
                // select Cash Type
                stDr.EDU_YEAR     = CoboYear.Text;
                stDr.STUDENT_ID   = TxtStudID.Text;
                stDr.STUDENT_NAME = TxtStuName.Text;
                stDr.GRADE_ID     = calculation();
                stDr = stuService.getCashType(stDr, out msg);

                // show Cash Type
                if (stDr != null)
                {
                    LabCashTypeVal.Text = stDr.CASH_TYPE1;
                }
            }
        }
        protected void CoboSelect_Change(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_CASHRow stuCashDr = new DsPSMS.ST_STUDENT_CASHDataTable().NewST_STUDENT_CASHRow();
            DsPSMS.ST_STUDENT_DATARow stuDataDr = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();

            if (TxtStudID.Text.Trim().Length != 0)
            {
                stuDataDr.STUDENT_ID = TxtStudID.Text;
                stuCashDr.STUDENT_ID = TxtStudID.Text;
                stuDataDr.EDU_YEAR   = CoboYear.Text;
                stuCashDr.EDU_YEAR   = CoboYear.Text;
                stuDataDr            = stuService.getStuName(stuDataDr, out msg);
                if (stuDataDr != null)
                {
                    LabStuNameVal.Text = stuDataDr.STUDENT_NAME;
                }
                else
                {
                    // MessageBox.Show(msg);
                    showOneCashData(stuCashDr);
                }
            }
        }
        protected void search_Click(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_CASHRow stuCashDr = new DsPSMS.ST_STUDENT_CASHDataTable().NewST_STUDENT_CASHRow();
            DsPSMS.ST_STUDENT_DATARow stuDataDr = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();

            if (CoboYear.Text.Trim().Length != 0 && TxtStudID.Text.Trim().Length != 0)
            {
                stuDataDr.STUDENT_ID = TxtStudID.Text;
                stuCashDr.STUDENT_ID = TxtStudID.Text;
                stuDataDr.EDU_YEAR   = CoboYear.Text;
                stuCashDr.EDU_YEAR   = CoboYear.Text;
                stuDataDr            = stuService.getStuName(stuDataDr, out msg);
                if (stuDataDr != null)
                {
                    LabStuNameVal.Text = stuDataDr.STUDENT_NAME;
                    showOneCashData(stuCashDr);
                }
            }
            else
            {
                errSeach.Text = "Please Enter Student Id and Choose the Year";
            }
        }
コード例 #13
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_DATARow studata = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
            if (checkValidation())
            {
                string gradeid = stulistgrade.SelectedItem.Value;

                string eduyearid = comboYear.SelectedItem.Value;

                string name = searchstuname.Text;

                DsPSMS.ST_STUDENT_DATADataTable studentData = stuentry.searchnamegradeyear(name, gradeid, eduyearid);
                if (studentData != null)
                {
                    displayGrid(studentData);
                }
                else
                {
                    GridView1.Visible  = false;
                    errorSeach.Visible = true;
                    errorSeach.Text    = "There is no data";
                }
            }
        }
コード例 #14
0
        protected void btnSearchGEdu_Click(object sender, EventArgs e)
        {
            DsPSMS.ST_STUDENT_DATARow studata = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
            if (ValidationGradeEdu())
            {
                string grade = stulistgrade.SelectedItem.Value;

                string eduyear = comboYear.SelectedItem.Value;



                DsPSMS.ST_STUDENT_DATADataTable studentgyearData = stuentry.searchgradeyear(grade, eduyear);
                if (studentgyearData != null)
                {
                    displaygyearGrid(studentgyearData);
                }
                else
                {
                    GridView1.Visible  = false;
                    errorSeach.Visible = true;
                    errorSeach.Text    = "There is no data";
                }
            }
        }
コード例 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            imgSchool.ImageUrl      = "~/Images/school.png";
            stdInfo.ImageUrl        = "~/Images/student.png";
            attendanceInfo.ImageUrl = "~/Images/attendance.jpg";
            examInfo.ImageUrl       = "~/Images/exam.png";
            teacherInfo.ImageUrl    = "~/Images/teacher.png";
            system.ImageUrl         = "~/Images/system.jpg";


            if (!IsPostBack)
            {
                DsPSMS.ST_STUDENT_DATARow stuentryupdate = new DsPSMS.ST_STUDENT_DATADataTable().NewST_STUDENT_DATARow();
                if (Session["EDU_YEAR"] != null)
                {
                    education.Text = (string)(Session["EDU_YEAR"] ?? " ");
                }

                if (Session["STUDENT_ID"] != null)
                {
                    stuid.Text = (string)(Session["STUDENT_ID"] ?? " ");
                }


                if (Session["STUDENT_NAME"] != null)
                {
                    stuname.Text = (string)(Session["STUDENT_NAME"] ?? " ");
                }

                if (Session["ROLL_NO"] != null)
                {
                    rollno.Text = (string)(Session["ROLL_NO"] ?? " ");
                }

                if (Session["GENDER"] != null)
                {
                    if (Session["GENDER"].Equals("Female"))
                    {
                        Female.Checked = true;
                    }
                    else
                    {
                        Male.Checked = true;
                    }
                }

                if (Session["PHOTO_PATH"] != null)
                {
                    studentpicture.ImageUrl = (string)(Session["PHOTO_PATH"] ?? " ");
                }

                if (Session["DOB"] != null)
                {
                    dob.Text = (string)(Session["DOB"] ?? " ");
                }

                if (Session["PHONE"] != null)
                {
                    stuphone.Text = (string)(Session["PHONE"] ?? " ");
                }

                if (Session["NRC_NO"] != null)
                {
                    nrcno.Text = (string)(Session["NRC_NO"] ?? " ");
                }

                if (Session["PASSWORD"] != null)
                {
                    password.Text = (string)(Session["PASSWORD"] ?? " ");
                }

                if (Session["GRADE_ID"] != null)
                {
                    grade.Text = (string)(Session["GRADE_ID"] ?? " ");
                }

                if (Session["ROOM_ID"] != null)
                {
                    roomid.Text = (string)(Session["ROOM_ID"] ?? " ");
                }

                if (Session["FATHER_NAME"] != null)
                {
                    father.Text = (string)(Session["FATHER_NAME"] ?? " ");
                }

                if (Session["MOTHER_NAME"] != null)
                {
                    mother.Text = (string)(Session["MOTHER_NAME"] ?? " ");
                }

                if (Session["ADDRESS"] != null)
                {
                    address.Text = (string)(Session["ADDRESS"] ?? " ");
                }

                if (Session["CONTACT_PHONE"] != null)
                {
                    phone.Text = (string)(Session["CONTACT_PHONE"] ?? " ");
                }
                if (Session["EMAIL"] != null)
                {
                    email.Text = (string)(Session["EMAIL"] ?? " ");
                }
                if (Session["CASH_TYPE1"] != null)
                {
                    cashtype.Text = (string)(Session["CASH_TYPE1"] ?? " ");
                }
                if (Session["CASH_TYPE2"] != null)
                {
                    if (Session["CASH_TYPE2"].Equals("1"))
                    {
                        firstmonth.Checked = true;
                    }
                    if (Session["CASH_TYPE2"].Equals("3"))
                    {
                        thirdmonth.Checked = true;
                    }
                    if (Session["CASH_TYPE2"].Equals("4"))
                    {
                        fourmonth.Checked = true;
                    }
                }
            }
        }