Esempio n. 1
0
    }     //end function

    public StudentIntermediateSubject StudentIntermediateSubjectSelectByID(int intStudentSubjectID)
    {
        try
        {
            string sp_name = "StudentIntermediateSubjectSelectByID";
            comStudentIntermediateSubject.Parameters.AddWithValue("StudentSubjectID", intStudentSubjectID);
            ConnectAndExecute(sp_name);             //no parameter will send to stored procedure
            if (dsStudentIntermediateSubject.Tables[0].Rows.Count == 1)
            {
                DataRow drStudentIntermediateSubject = dsStudentIntermediateSubject.Tables[0].Rows[0];
                StudentIntermediateSubject objStudentIntermediateSubject = new StudentIntermediateSubject();
                objStudentIntermediateSubject.StudentSubjectID   = Convert.ToInt64(drStudentIntermediateSubject["StudentSubjectID"]);
                objStudentIntermediateSubject.StudentID          = Convert.ToInt64(drStudentIntermediateSubject["StudentID"]);
                objStudentIntermediateSubject.SubjectID          = Convert.ToInt64(drStudentIntermediateSubject["SubjectID"]);
                objStudentIntermediateSubject.Remarks            = Convert.ToString(drStudentIntermediateSubject["Remarks"]);
                objStudentIntermediateSubject.AddedByID          = Convert.ToInt64(drStudentIntermediateSubject["AddedByID"]);
                objStudentIntermediateSubject.AddedDateTime      = Convert.ToDateTime(drStudentIntermediateSubject["AddedDateTime"]);
                objStudentIntermediateSubject.LastUpdateID       = Convert.ToInt64(drStudentIntermediateSubject["LastUpdateID"]);
                objStudentIntermediateSubject.LastUpdateDateTime = Convert.ToDateTime(drStudentIntermediateSubject["LastUpdateDateTime"]);

                return(objStudentIntermediateSubject);
            }
            return(null);
        }
        catch (Exception ex)
        {
            SetError(ex.Message);
            return(null);
        } //end try
    }     //end function
Esempio n. 2
0
    ///////////////////////////////////////////////////////////////////////////////////////////

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

    //DB to Model//
    private void GenerateModelList()
    {
        StudentIntermediateSubjectList.Clear();
        foreach (DataRow drStudentIntermediateSubject in dsStudentIntermediateSubject.Tables[0].Rows)
        {
            StudentIntermediateSubject objStudentIntermediateSubject = new StudentIntermediateSubject();
            objStudentIntermediateSubject.StudentSubjectID   = Convert.ToInt64(drStudentIntermediateSubject["StudentSubjectID"]);
            objStudentIntermediateSubject.StudentID          = Convert.ToInt64(drStudentIntermediateSubject["StudentID"]);
            objStudentIntermediateSubject.SubjectID          = Convert.ToInt64(drStudentIntermediateSubject["SubjectID"]);
            objStudentIntermediateSubject.Remarks            = Convert.ToString(drStudentIntermediateSubject["Remarks"]);
            objStudentIntermediateSubject.AddedByID          = Convert.ToInt64(drStudentIntermediateSubject["AddedByID"]);
            objStudentIntermediateSubject.AddedDateTime      = Convert.ToDateTime(drStudentIntermediateSubject["AddedDateTime"]);
            objStudentIntermediateSubject.LastUpdateID       = Convert.ToInt64(drStudentIntermediateSubject["LastUpdateID"]);
            objStudentIntermediateSubject.LastUpdateDateTime = Convert.ToDateTime(drStudentIntermediateSubject["LastUpdateDateTime"]);

            StudentIntermediateSubjectList.Add(objStudentIntermediateSubject);
        }
    }
Esempio n. 3
0
        private void StudentInterMediateSubjectInsertUpdate(Int64 student_Id = 0)
        {
            StudentIntermediateSubject studentIntermediateSubject = new StudentIntermediateSubject();
            ArrayList studentInterSubjectList = chkInterSelectedSubject.GetSelectedItems();

            foreach (StudentSubject studentSubject in studentInterSubjectList)
            {
                studentIntermediateSubject = new StudentIntermediateSubject();
                studentIntermediateSubject.StudentSubjectID   = 0;
                studentIntermediateSubject.StudentID          = student_Id;
                studentIntermediateSubject.SubjectID          = studentSubject.SubjectID;
                studentIntermediateSubject.Remarks            = txtInterStudentRemarks.Text;
                studentIntermediateSubject.AddedByID          = Convert.ToInt64(this.Tag);
                studentIntermediateSubject.AddedDateTime      = System.DateTime.Now;
                studentIntermediateSubject.LastUpdateID       = Convert.ToInt64(this.Tag);
                studentIntermediateSubject.LastUpdateDateTime = System.DateTime.Now;
                StudentIntermediateSubjectController.InsertUpdateStudentIntermediateSubject(studentIntermediateSubject);
            }
        }
    public static Int64 InsertUpdateStudentIntermediateSubject(StudentIntermediateSubject objIUStudentIntermediateSubject)
    {
        Int64 new_id = objIUStudentIntermediateSubject.InsertUpdateStudentIntermediateSubject();

        return(new_id);
    }