Esempio n. 1
0
 private void BindData()
 {
     DBLayer db = new DBLayer();
     DataSet ds = new DataSet();
     ds = db.GetFeesByClassAndClassRoomAndSchoolYear(Convert.ToInt32(uiDropDownListClasses.SelectedValue),
                                                     Convert.ToInt32(uiDropDownListClassRooms.SelectedValue),
                                                     Convert.ToInt32(uiDropDownListSchoolYear.SelectedValue));
     uiGridViewStudentsFees.DataSource = ds;
     uiGridViewStudentsFees.DataBind();
 }
Esempio n. 2
0
 protected void uiGridViewStudents_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditFees")
     {
         int id = Convert.ToInt32(e.CommandArgument.ToString());
         CurrentStudentActive = id;
         DBLayer db = new DBLayer();
         DataSet ds = new DataSet();
         ds = db.GetStudent(CurrentStudentActive);
         if (ds.Tables[0].Rows.Count > 0)
         {
             uiGridViewStudentsFees.DataSource = db.GetFeesByClassAndClassRoomAndSchoolYear(Convert.ToInt32(uiDropDownListClasses.SelectedValue),
                                                     Convert.ToInt32(uiDropDownListClassRooms.SelectedValue),
                                                     Convert.ToInt32(uiDropDownListSchoolYear.SelectedValue));
             uiGridViewStudentsFees.DataBind();
             uiLabelStudentName.Text = ds.Tables[0].Rows[0]["ARStudentName"].ToString() + " " + ds.Tables[0].Rows[0]["ArFatherName"].ToString();
             DataSet StudentClassRoom = new DataSet();
             StudentClassRoom = db.GetClassRoom(Convert.ToInt32(ds.Tables[0].Rows[0]["ClassRoomID"].ToString()));
             DataSet StudentClass = new DataSet();
             StudentClass = db.GetClass(Convert.ToInt32(StudentClassRoom.Tables[0].Rows[0]["ClassID"].ToString()));
             uiLabelClass.Text = StudentClass.Tables[0].Rows[0]["ArName"].ToString();
         }
         uiPanelCurrentFees.Visible = false;
         uiPanelCurrent.Visible = true;
     }
 }