Example #1
0
    }     //end function

    public StudentAssignedSubject StudentAssignedSubjectSelectByID(int intStudentSubjectID)
    {
        try
        {
            string sp_name = "StudentAssignedSubjectSelectByID";
            comStudentAssignedSubject.Parameters.AddWithValue("StudentSubjectID", intStudentSubjectID);
            ConnectAndExecute(sp_name);             //no parameter will send to stored procedure
            if (dsStudentAssignedSubject.Tables[0].Rows.Count == 1)
            {
                DataRow drStudentAssignedSubject = dsStudentAssignedSubject.Tables[0].Rows[0];
                StudentAssignedSubject objStudentAssignedSubject = new StudentAssignedSubject();
                objStudentAssignedSubject.StudentSubjectID   = Convert.ToInt64(drStudentAssignedSubject["StudentSubjectID"]);
                objStudentAssignedSubject.StudentID          = Convert.ToInt64(drStudentAssignedSubject["StudentID"]);
                objStudentAssignedSubject.SubjectID          = Convert.ToInt64(drStudentAssignedSubject["SubjectID"]);
                objStudentAssignedSubject.Remarks            = Convert.ToString(drStudentAssignedSubject["Remarks"]);
                objStudentAssignedSubject.AddedByID          = Convert.ToInt64(drStudentAssignedSubject["AddedByID"]);
                objStudentAssignedSubject.AddedDateTime      = Convert.ToDateTime(drStudentAssignedSubject["AddedDateTime"]);
                objStudentAssignedSubject.LastUpdateID       = Convert.ToInt64(drStudentAssignedSubject["LastUpdateID"]);
                objStudentAssignedSubject.LastUpdateDateTime = Convert.ToDateTime(drStudentAssignedSubject["LastUpdateDateTime"]);

                return(objStudentAssignedSubject);
            }
            return(null);
        }
        catch (Exception ex)
        {
            SetError(ex.Message);
            return(null);
        } //end try
    }     //end function
Example #2
0
    ///////////////////////////////////////////////////////////////////////////////////////////

    //Private Methods///////////////////////////////////////////////////////////////////////////

    //DB to Model//
    private void GenerateModelList()
    {
        StudentAssignedSubjectList.Clear();
        foreach (DataRow drStudentAssignedSubject in dsStudentAssignedSubject.Tables[0].Rows)
        {
            StudentAssignedSubject objStudentAssignedSubject = new StudentAssignedSubject();
            objStudentAssignedSubject.StudentSubjectID   = Convert.ToInt64(drStudentAssignedSubject["StudentSubjectID"]);
            objStudentAssignedSubject.StudentID          = Convert.ToInt64(drStudentAssignedSubject["StudentID"]);
            objStudentAssignedSubject.SubjectID          = Convert.ToInt64(drStudentAssignedSubject["SubjectID"]);
            objStudentAssignedSubject.Remarks            = Convert.ToString(drStudentAssignedSubject["Remarks"]);
            objStudentAssignedSubject.AddedByID          = Convert.ToInt64(drStudentAssignedSubject["AddedByID"]);
            objStudentAssignedSubject.AddedDateTime      = Convert.ToDateTime(drStudentAssignedSubject["AddedDateTime"]);
            objStudentAssignedSubject.LastUpdateID       = Convert.ToInt64(drStudentAssignedSubject["LastUpdateID"]);
            objStudentAssignedSubject.LastUpdateDateTime = Convert.ToDateTime(drStudentAssignedSubject["LastUpdateDateTime"]);

            StudentAssignedSubjectList.Add(objStudentAssignedSubject);
        }
    }
Example #3
0
        private void StudentAssingedSubjectInsertUpdate(Int64 student_Id = 0)
        {
            StudentAssignedSubject studentAssignedSubject = new StudentAssignedSubject();
            ArrayList subjectList = chkAdmissionSubject.GetSelectedItems();

            foreach (StudentSubject studentSubject in subjectList)
            {
                studentAssignedSubject = new StudentAssignedSubject();
                studentAssignedSubject.StudentSubjectID   = 0;
                studentAssignedSubject.SubjectID          = studentSubject.SubjectID;
                studentAssignedSubject.StudentID          = student_Id;
                studentAssignedSubject.Remarks            = txtAdmissionInfoRemarks.Text;
                studentAssignedSubject.AddedByID          = Convert.ToInt32(this.Tag);
                studentAssignedSubject.AddedDateTime      = System.DateTime.Now;
                studentAssignedSubject.LastUpdateID       = Convert.ToInt32(this.Tag);
                studentAssignedSubject.LastUpdateDateTime = System.DateTime.Now;
                StudentAssignedSubjectController.InsertUpdateStudentAssignedSubject(studentAssignedSubject);
            }
        }
Example #4
0
    public static Int64 InsertUpdateStudentAssignedSubject(StudentAssignedSubject objIUStudentAssignedSubject)
    {
        Int64 new_id = objIUStudentAssignedSubject.InsertUpdateStudentAssignedSubject();

        return(new_id);
    }