private static DataTable GetBranchList(Int16 nCourseID)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nCourseID", nCourseID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetBranchDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
        private DataTable GetCompanyList()
        {
            DataTable _dt = null;

            DataAccess _DataAccess = new DataAccess();

            try
            {
                //_dt = _Student.GetStudentInfo(0);
                _DataAccess.OpenConnection(false);
                _DataAccess.Retrive_Query("SELECT [Company Name] FROM [dbo].[Company]", out _dt);

                _DataAccess.CloseConnection(false);

            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
            }
            return _dt;
        }
Пример #3
0
        public Int64 InsertUpdateStudentInfo()
        {
            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            Int64 _result = 0;
            object _val = null;
            try
            {
                _DBParameters = new DBParameters();
                _DataAccess = new DataAccess();

                _DataAccess.OpenConnection(false);

                _DBParameters.clear();
                _DBParameters.Add("@nStudentID", this.nStudentID, ParameterDirection.InputOutput, SqlDbType.BigInt);
                _DBParameters.Add("@sStudFirstName", this.sStudFirstName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudMiddleName", this.sStudMiddleName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudLastName", this.sStudLastName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudEmailID", this.sStudEmailID, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sStudRegistrationID", this.sStudRegistrationID, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sUserName", this.sStudUserName, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sPassword", this.sStudPassword, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sCurrentYear", this.sStudCurrentYear, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nBranchID", this.nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@dtStudDOB", this.dtStudDOB, ParameterDirection.Input, SqlDbType.DateTime);
                _DBParameters.Add("@bIsStudentActive", this.bIsStudentActive, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nEduDtlsID", this.nEduDtlsID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@sSSCMarks", this.sSSCMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sHSCMarks", this.sHSCMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sDiplomaMarks", this.sDiplomaMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sFirstYearMarks", this.sFirstYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sSecondYearMarks", this.sSecondYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sThirdYearMarks", this.sThirdYearMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@sBEMarks", this.sBEMarks, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Execute("SP_SVIT_InsertUpdateStudent", _DBParameters, out _val);

                this.nStudentID = (Int64)_val;
                _DataAccess.CloseConnection(false);
                _result = this.nStudentID;
            }
            catch (Exception ex)
            {
                _DataAccess.CloseConnection(false);
                //MessageBox.Show("Exception: " + ex.ToString());
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                    _DBParameters = null;
                }
                if (_DataAccess != null)
                {
                    _DataAccess.Dispose();
                }
            }
            return _result;
        }
Пример #4
0
        public Int64 InsertUpdateAlumniStudentInfo(DataTable dtFriendsDetails)
        {
            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            Int64 _result = 0;
            object _val = null;
            try
            {
                _DBParameters = new DBParameters();
                _DataAccess = new DataAccess();

                _DataAccess.OpenConnection(false);

                _DBParameters.clear();
                _DBParameters.Add("@nAlumniID", this.nAlumniID, ParameterDirection.InputOutput, SqlDbType.BigInt);
                _DBParameters.Add("@sAlumniName", this.sAlumniName, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sAdmissionYear", this.sAdmissionYear, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPassingYear", this.sPassingYear, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@nBranchID", this.nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DBParameters.Add("@sContactNo", this.sContactNo, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sAlternateContactNo", this.sAlternateContactNo, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPersonalEmailID", this.sPersonalEmailID, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sOfficeEmailID", this.sOfficeEmailID, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCorrespondanceAddress", this.sCorrespondanceAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sPermanentAddress", this.sPermanentAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sOccupation", this.sOccupation, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sDesigation", this.sDesigation, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCompanyName", this.sCompanyName, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sCompanyAddress", this.sCompanyAddress, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sWhatsUpDetails", this.sWhatsUpDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sFacebookDetails", this.sFacebookDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@sLinkedinDetails", this.sLinkedinDetails, ParameterDirection.Input, SqlDbType.NVarChar);
                _DBParameters.Add("@FriendsDetails", dtFriendsDetails, ParameterDirection.Input, SqlDbType.Structured);
                _DataAccess.Execute("SP_SVIT_InsertUpdateAlumniDetails", _DBParameters, out _val);

                this.nStudentID = (Int64)_val;
                _DataAccess.CloseConnection(false);
                _result = this.nStudentID;
            }
            catch (Exception ex)
            {
                _DataAccess.CloseConnection(false);
                //MessageBox.Show("Exception: " + ex.ToString());
            }
            finally
            {
                if (_DBParameters != null)
                {
                    _DBParameters.Dispose();
                    _DBParameters = null;
                }
                if (_DataAccess != null)
                {
                    _DataAccess.Dispose();
                }
            }
            return _result;
        }
Пример #5
0
        public DataTable GetWorkshopDetails(Int64 nBranchID = 0)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nBranchID", nBranchID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetWorkshopSeminar", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
Пример #6
0
        public DataTable GetStudentDetailsByUserName(string UserName)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@sUserName", UserName, ParameterDirection.Input, SqlDbType.VarChar);
                _DataAccess.Retrive("SP_SVIT_GetStudentsLoginDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }

            return _dt;
        }
Пример #7
0
        public DataSet GetPaperSeminarBYStaff(Int64 nStaffID = 0)
        {
            DataSet _ds = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nStaffID", nStaffID, ParameterDirection.Input, SqlDbType.BigInt);
                _DataAccess.Retrive("SP_SVIT_GetPaperAndSeminarByStaff", _DBParameters, out _ds);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _ds;
        }
Пример #8
0
        public DataTable GetLatestNEWS(int nNewsType,Boolean bIsShownOnNEWS=false)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@nNewsType", nNewsType, ParameterDirection.Input, SqlDbType.Int);
                _DBParameters.Add("@bIsShowOnNEWS", bIsShownOnNEWS, ParameterDirection.Input, SqlDbType.Bit);
                _DataAccess.Retrive("SP_SVIT_GetLatestNews", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
Пример #9
0
        public DataTable GetIntituteDetails(bool bIsShowInAbout)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@bIsShowInAbout", bIsShowInAbout, ParameterDirection.Input, SqlDbType.Bit);
                _DataAccess.Retrive("SP_SVIT_GetIntituteDetails", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
Пример #10
0
        public DataTable GetImportantLinks()
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DataAccess.Retrive("SP_SVIT_GetImportantLinks", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }
Пример #11
0
        public DataTable GetAlumniInfo(string sSearchString, int nSearchCriteria)
        {
            DataTable _dt = null;

            DBParameters _DBParameters = new DBParameters();
            DataAccess _DataAccess = new DataAccess();
            try
            {
                _DataAccess.OpenConnection(false);
                _DBParameters.clear();
                _DBParameters.Add("@sSearchString", sSearchString, ParameterDirection.Input, SqlDbType.VarChar);
                _DBParameters.Add("@nSearchCriteria", nSearchCriteria, ParameterDirection.Input, SqlDbType.Int);
                _DataAccess.Retrive("SP_SVIT_GetSearchAlumni", _DBParameters, out _dt);

                _DataAccess.CloseConnection(false);
            }
            catch (Exception)
            {
                if (_DataAccess != null) { _DataAccess.RollBack(); _DataAccess.CloseConnection(false); }
            }
            finally
            {
                if (_DBParameters != null) { _DBParameters.Dispose(); }
            }
            return _dt;
        }