Beispiel #1
0
        private void StudentMAstertInsertUpdate(Int64 student_Id = 0)
        {
            StudentMasterRecord studentMasterRecord = new StudentMasterRecord();

            studentMasterRecord.MasterStudentID     = 0;
            studentMasterRecord.StudentID           = student_id;
            studentMasterRecord.UniversityInstitute = txtMasterBoardInstiute.Text;
            studentMasterRecord.CollegeInstitute    = txtMastersUniversityCollege.Text;
            studentMasterRecord.EducationSystem     = Convert.ToString(cmbMasterEducationSystem.Text);
            studentMasterRecord.Major              = Convert.ToInt64(cmbMasterMajor.SelectedValue);
            studentMasterRecord.TotalMarks         = Convert.ToInt32(txtMasterTotalMarks.Text);
            studentMasterRecord.ObtainedMarks      = Convert.ToInt32(txtMasterObtainedMarks.Text);
            studentMasterRecord.CGPA               = Convert.ToDouble(txtMasterObtainedCGPA.Text);
            studentMasterRecord.YearPassed         = Convert.ToInt32(txtMasterPassingYear.Text);
            studentMasterRecord.AddByID            = Convert.ToInt64(this.Tag);
            studentMasterRecord.AddDateTime        = System.DateTime.Now;
            studentMasterRecord.LastUpdateID       = Convert.ToInt64(this.Tag);
            studentMasterRecord.LastUpdateDateTime = System.DateTime.Now;
            StudentMasterRecordController.InsertUpdateStudentMasterRecord(studentMasterRecord);
        }
Beispiel #2
0
    }     //end function

    public StudentMasterRecord StudentMasterRecordSelectByID(int intMasterStudentID)
    {
        try
        {
            string sp_name = "StudentMasterRecordSelectByID";
            comStudentMasterRecord.Parameters.AddWithValue("MasterStudentID", intMasterStudentID);
            ConnectAndExecute(sp_name); //no parameter will send to stored procedure
            if (dsStudentMasterRecord.Tables[0].Rows.Count == 1)
            {
                DataRow             drStudentMasterRecord  = dsStudentMasterRecord.Tables[0].Rows[0];
                StudentMasterRecord objStudentMasterRecord = new StudentMasterRecord();
                objStudentMasterRecord.MasterStudentID     = Convert.ToInt64(drStudentMasterRecord["MasterStudentID"]);
                objStudentMasterRecord.StudentID           = Convert.ToInt64(drStudentMasterRecord["StudentID"]);
                objStudentMasterRecord.UniversityInstitute = Convert.ToString(drStudentMasterRecord["UniversityInstitute"]);
                objStudentMasterRecord.CollegeInstitute    = Convert.ToString(drStudentMasterRecord["CollegeInstitute"]);
                objStudentMasterRecord.EducationSystem     = Convert.ToString(drStudentMasterRecord["EducationSystem"]);
                objStudentMasterRecord.Major              = Convert.ToInt64(drStudentMasterRecord["Major"]);
                objStudentMasterRecord.TotalMarks         = Convert.ToInt32(drStudentMasterRecord["TotalMarks"]);
                objStudentMasterRecord.ObtainedMarks      = Convert.ToInt32(drStudentMasterRecord["ObtainedMarks"]);
                objStudentMasterRecord.CGPA               = Convert.ToInt64(drStudentMasterRecord["CGPA"]);
                objStudentMasterRecord.YearPassed         = Convert.ToInt32(drStudentMasterRecord["YearPassed"]);
                objStudentMasterRecord.AddByID            = Convert.ToInt64(drStudentMasterRecord["AddByID"]);
                objStudentMasterRecord.AddDateTime        = Convert.ToDateTime(drStudentMasterRecord["AddDateTime"]);
                objStudentMasterRecord.LastUpdateID       = Convert.ToInt64(drStudentMasterRecord["LastUpdateID"]);
                objStudentMasterRecord.LastUpdateDateTime = Convert.ToDateTime(drStudentMasterRecord["LastUpdateDateTime"]);

                return(objStudentMasterRecord);
            }
            return(null);
        }
        catch (Exception ex)
        {
            SetError(ex.Message);
            return(null);
        } //end try
    }     //end function
Beispiel #3
0
    ///////////////////////////////////////////////////////////////////////////////////////////

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

    //DB to Model//
    private void GenerateModelList()
    {
        StudentMasterRecordList.Clear();
        foreach (DataRow drStudentMasterRecord in dsStudentMasterRecord.Tables[0].Rows)
        {
            StudentMasterRecord objStudentMasterRecord = new StudentMasterRecord();
            objStudentMasterRecord.MasterStudentID     = Convert.ToInt64(drStudentMasterRecord["MasterStudentID"]);
            objStudentMasterRecord.StudentID           = Convert.ToInt64(drStudentMasterRecord["StudentID"]);
            objStudentMasterRecord.UniversityInstitute = Convert.ToString(drStudentMasterRecord["UniversityInstitute"]);
            objStudentMasterRecord.CollegeInstitute    = Convert.ToString(drStudentMasterRecord["CollegeInstitute"]);
            objStudentMasterRecord.EducationSystem     = Convert.ToString(drStudentMasterRecord["EducationSystem"]);
            objStudentMasterRecord.Major              = Convert.ToInt64(drStudentMasterRecord["Major"]);
            objStudentMasterRecord.TotalMarks         = Convert.ToInt32(drStudentMasterRecord["TotalMarks"]);
            objStudentMasterRecord.ObtainedMarks      = Convert.ToInt32(drStudentMasterRecord["ObtainedMarks"]);
            objStudentMasterRecord.CGPA               = Convert.ToInt64(drStudentMasterRecord["CGPA"]);
            objStudentMasterRecord.YearPassed         = Convert.ToInt32(drStudentMasterRecord["YearPassed"]);
            objStudentMasterRecord.AddByID            = Convert.ToInt64(drStudentMasterRecord["AddByID"]);
            objStudentMasterRecord.AddDateTime        = Convert.ToDateTime(drStudentMasterRecord["AddDateTime"]);
            objStudentMasterRecord.LastUpdateID       = Convert.ToInt64(drStudentMasterRecord["LastUpdateID"]);
            objStudentMasterRecord.LastUpdateDateTime = Convert.ToDateTime(drStudentMasterRecord["LastUpdateDateTime"]);

            StudentMasterRecordList.Add(objStudentMasterRecord);
        }
    }
    public static Int64 InsertUpdateStudentMasterRecord(StudentMasterRecord objIUStudentMasterRecord)
    {
        Int64 new_id = objIUStudentMasterRecord.InsertUpdateStudentMasterRecord();

        return(new_id);
    }