Ejemplo n.º 1
0
        public override string InsertFactor(string factorName, string factorRemar, bool isChargable, bool isVisible)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            string errMsg = "";

            try
            {
                _objDataWrapper.AddParameter("@AjFactorName", factorName);
                _objDataWrapper.AddParameter("@AjFactorRemark", factorRemar);
                _objDataWrapper.AddParameter("@AjIsChargeable", isChargable);
                _objDataWrapper.AddParameter("@AjIsVisible", isVisible);
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Insert_Update_Package_Factor");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errMsg = Convert.ToString(ObjErrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertFactor in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(errMsg);
        }
Ejemplo n.º 2
0
        public override int InsertCoursePaymentMasterDetails(int CourseId, string OnlinePaymentAmount, string OfflinePaymentAmount, out string errMsg, int createdBy)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errMsg          = string.Empty;
            try
            {
                _objDataWrapper.AddParameter("@CourseId", CourseId);
                _objDataWrapper.AddParameter("@OnlinePaymentAmount", OnlinePaymentAmount);
                _objDataWrapper.AddParameter("@OfflinePaymentAmount", OfflinePaymentAmount);
                _objDataWrapper.AddParameter("@createdBy", createdBy);
                var objErrmsg =
                    (SqlParameter)
                    (_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.NVarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateCoursePaymentMaster");
                if (objErrmsg != null && objErrmsg.Value != null)
                {
                    errMsg = Convert.ToString(objErrmsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertCoursePayment in Course.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }



            return(_i);
        }
Ejemplo n.º 3
0
        public override string InsertPackageFactor(int packageId, int factorId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            string errMsg = "";

            try
            {
                _objDataWrapper.AddParameter("@PackageId", packageId);
                _objDataWrapper.AddParameter("@FactorId", factorId);
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@errMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_InsertPackageFactor");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errMsg = Convert.ToString(ObjErrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertPackageFactor in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }

            return(errMsg);
        }
Ejemplo n.º 4
0
 public override int InsertStateDetails(string stateName, int zoneId, int countryId, int createdBy, out string errmsg)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errmsg          = string.Empty;
     try
     {
         _objDataWrapper.AddParameter("@StateName", stateName);
         _objDataWrapper.AddParameter("@ZoneId", zoneId);
         _objDataWrapper.AddParameter("@CountryId", countryId);
         _objDataWrapper.AddParameter("@CreatedBy", createdBy);
         var objerrMsg =
             (SqlParameter)
             (_objDataWrapper.AddParameter("@errmsg", "", SqlDbType.VarChar, ParameterDirection.Output, 64));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateState");
         if (objerrMsg != null && objerrMsg.Value != null)
         {
             errmsg = Convert.ToString(objerrMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         const string addInfo = "Error while executing InsertStateDetails in State.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 5
0
        public override List <QueryProperty> GetCollegeQuery(int collegebranchId, int queryId, int course)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var listQueryProperty = new List <QueryProperty>();

            _dataset = new DataSet();
            try
            {
                _objDataWrapper.AddParameter("@CollegeId", collegebranchId);
                _objDataWrapper.AddParameter("@QueryId", queryId);
                _objDataWrapper.AddParameter("@CourseId", course);
                _dataset          = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetCollegeQuery");
                listQueryProperty = BindQueryObjectList(_dataset.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetCollegeQuery in Query.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(listQueryProperty);
        }
Ejemplo n.º 6
0
        public override List <BO.UniversityProperty> GetUniversityListByCategoryUniversityName(int universityCategoryId, string universityName)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            var objUniversityList = new List <BO.UniversityProperty>();

            try
            {
                _objDataWrapper.AddParameter("@UniversityName", universityName);
                _objDataWrapper.AddParameter("@UniversityCategoryId", universityCategoryId);
                _dataSet          = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetUniversityList");
                objUniversityList = BindUniversityObject(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUniversityListByCategoryUniversityName in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objUniversityList);
        }
Ejemplo n.º 7
0
        public override List <CourseStreamProperty> GetStreamListByStreamNameCourseId(int courseId, string streamName)
        {
            var courseStreamObjectList = new List <CourseStreamProperty>();

            _dataSet        = new DataSet();
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            try
            {
                _objDataWrapper.AddParameter("@CourseId", courseId);
                _objDataWrapper.AddParameter("@StreamName", streamName);
                _dataSet = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetStreamList");
                courseStreamObjectList = BindStreamObjectList(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetStreamListByStreamNameCourseId in Stream.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(courseStreamObjectList);
        }
Ejemplo n.º 8
0
        public override int UpdateUnivesityCategoryDetails(BO.UniversityCategoryProperty objUniversityCategory, int modifiedBy, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";

            try
            {
                _objDataWrapper.AddParameter("@UniversityCategoryId", objUniversityCategory.UniversityCategoryId);
                _objDataWrapper.AddParameter("@UniversityCategoryName", objUniversityCategory.UniversityCategoryName);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
                var objErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateUniversityCategoryDetails");
                if (objErrMsg != null && objErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(objErrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUnivesityCategoryDetails in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Ejemplo n.º 9
0
 public override int UpdateQueryReplyStatus(QueryProperty objQuickQuery, out string errMsg)
 {
     errMsg          = "";
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     try
     {
         _objDataWrapper.AddParameter("@UserId", objQuickQuery.UserId);
         _objDataWrapper.AddParameter("@QueryId", objQuickQuery.StudentQueryId);
         _objDataWrapper.AddParameter("@ReplyStatus", objQuickQuery.ReplyStatus);
         var ObjerrMsg =
             (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_UpdateQyeryStatus");
         if (ObjerrMsg != null && ObjerrMsg.Value != null)
         {
             errMsg = Convert.ToString(ObjerrMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing UpdateQueryReplyStatus in Query.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 10
0
 public override int ModerateStudentQuery(int queryId, int moderateBy, bool status, out string errMsg)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errMsg          = "";
     try
     {
         _objDataWrapper.AddParameter("@queryStatus", status);
         _objDataWrapper.AddParameter("@QueryId", queryId);
         _objDataWrapper.AddParameter("@ModerateBy", moderateBy);
         var objerrMsg =
             (SqlParameter)(_objDataWrapper.AddParameter("@errMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_ModerateQuery");
         if (objerrMsg != null && objerrMsg.Value != null)
         {
             errMsg = Convert.ToString(objerrMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing BindQueryObjectList in Query.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 11
0
 public override int UpdateCourseCategory(int courseCategoryId, string courseCategoryName, out string errmsg, int modifiedBy, bool courseCategoryStatus = false)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errmsg          = string.Empty;
     try
     {
         _objDataWrapper.AddParameter("@CourseCategoryId", courseCategoryId);
         _objDataWrapper.AddParameter("@CourseCategoryName", courseCategoryName);
         _objDataWrapper.AddParameter("@CourseCategoryStatus", courseCategoryStatus);
         _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
         var objErrmsg =
             (SqlParameter)
             (_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.NVarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateCourseCategoryDetails");
         if (objErrmsg != null && objErrmsg.Value != null)
         {
             errmsg = Convert.ToString(objErrmsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing UpdateCourseCategory in Course.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 12
0
 public override int InsertFAQCategory(FAQCategoryProperty objFAQCategoryProperty, int createdBy, out string errmsg)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errmsg          = "";
     try
     {
         _objDataWrapper.AddParameter("@FAQCategoryName", objFAQCategoryProperty.FAQCategoryName);
         _objDataWrapper.AddParameter("@FAQCategoryStatus", objFAQCategoryProperty.FAQCategoryStatus);
         _objDataWrapper.AddParameter("@CreatedBy", createdBy);
         var errMsg =
             (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateFAQCategory");
         if (errMsg != null && errMsg.Value != null)
         {
             errmsg = Convert.ToString(errMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing InsertFAQCategory in FAQ.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 13
0
        public override string  CheckQueryModerate(int queryId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var isModerated = "";

            try
            {
                _objDataWrapper.AddParameter("@QueryId", queryId);

                var objerrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@moderate", "", SqlDbType.NVarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_CheckQueryModerate");
                if (objerrMsg != null && objerrMsg.Value != null)
                {
                    isModerated = Convert.ToString(objerrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindQueryObjectList in Query.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(isModerated);
        }
Ejemplo n.º 14
0
        public override int ChangePassword(int userId, string oldPassword, string newPassword, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            string Password  = "";
            var    objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserId", userId);
                _objDataWrapper.AddParameter("@UserOldPassword", objCrypto.Encrypt(oldPassword));
                _objDataWrapper.AddParameter("@UserNewPassword", objCrypto.Encrypt(newPassword));
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));

                _i = _objDataWrapper.ExecuteNonQuery("Aj_UserChangePassword");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(ObjErrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserPassword in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Ejemplo n.º 15
0
 public override int InsertLoanQuickQuery(QueryProperty objQuickQuery, out string errMsg)
 {
     errMsg          = "";
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     try
     {
         _objDataWrapper.AddParameter("@UserEmailId", objQuickQuery.UserEmailId);
         _objDataWrapper.AddParameter("@UserName", objQuickQuery.StudentName);
         _objDataWrapper.AddParameter("@UserMobile", objQuickQuery.UserMobileNo);
         _objDataWrapper.AddParameter("@UserPasseord", _objCrypto.Encrypt(objQuickQuery.UserMobileNo));
         _objDataWrapper.AddParameter("@UserCity", objQuickQuery.StudentCityName);
         _objDataWrapper.AddParameter("@UserQuerySourceTypeId", QueryType.Loan);
         _objDataWrapper.AddParameter("@UserCourseId", objQuickQuery.StudentCourseId);
         _objDataWrapper.AddParameter("@UserQuery", objQuickQuery.StudentQuery);
         var ObjerrMsg =
             (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUserQuery");
         if (ObjerrMsg != null && ObjerrMsg.Value != null)
         {
             errMsg = Convert.ToString(ObjerrMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing InsertLoanQuickQuery in Query.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 16
0
 public override int InsertCollegeSpeechDetails(CollegeSpeechProperty objCollegeSppechProperty, int createdBy, out string errmsg)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errmsg          = "";
     try
     {
         _objDataWrapper.AddParameter("@CollegeName", objCollegeSppechProperty.CollegeName);
         _objDataWrapper.AddParameter("@CollegeSpeechPersonDesignation", objCollegeSppechProperty.CollegeSpeechPersonDesignation);
         _objDataWrapper.AddParameter("@CollegeSpeechPersonName", objCollegeSppechProperty.CollegeSpeechPersonName);
         _objDataWrapper.AddParameter("@CollegeSpeechPersonImage", objCollegeSppechProperty.CollegeSpeechPersonImage);
         _objDataWrapper.AddParameter("@CollegeSpeechDesc", objCollegeSppechProperty.CollegeSpeechDesc);
         _objDataWrapper.AddParameter("@AboutKeyPerson", objCollegeSppechProperty.AboutKeyPerson);
         _objDataWrapper.AddParameter("@SpeechStatus", objCollegeSppechProperty.SpeechStatus);
         _objDataWrapper.AddParameter("@CreatedBy", createdBy);
         var errMsg =
             (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateCollegeSpeechDetails");
         if (errMsg != null && errMsg.Value != null)
         {
             errmsg = Convert.ToString(errMsg.Value);
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing InsertCollegeSpeechDetails in CollegeSpeech.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Ejemplo n.º 17
0
        public override List <FAQDetailsProperty> GetFAQDetailsByFAQCategory(int faqCategoryId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var objFAQDetailsList = new List <FAQDetailsProperty>();

            _dataSet = new DataSet();

            try
            {
                _objDataWrapper.AddParameter("@FAQCategoryId", faqCategoryId);
                _dataSet          = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetFAQDetails");
                objFAQDetailsList = BindFAQDetailsObjectList(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetFAQDetailsByFAQCategory in FAQ.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objFAQDetailsList);
        }
Ejemplo n.º 18
0
        public override List <ExamFormProperty> GetExamFormDetailsByExamSubject(string subjectName)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            var examFormPropertyList = new List <ExamFormProperty>();

            try
            {
                _objDataWrapper.AddParameter("@SubjectName", subjectName);
                _dataSet             = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetExamFormList");
                examFormPropertyList = BindExamFormListObject(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetExamFormDetailsByExamSubject in Exam.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(examFormPropertyList);
        }
Ejemplo n.º 19
0
        public override List <PackageFactor> GetFactorById(int factorId)
        {
            _dataSet = new DataSet();
            var objPackageFactorList = new List <PackageFactor>();

            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            try
            {
                _objDataWrapper.AddParameter("@AjFactorId", factorId);
                _dataSet             = _objDataWrapper.ExecuteDataSet("Aj_GetFactorList");
                objPackageFactorList = BindPackageFactor(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetFactorById in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objPackageFactorList);
        }
Ejemplo n.º 20
0
        public override List <UserRegistrationProperty> GetUserListByCourseId(int courseId)
        {
            var userListObject = new List <UserRegistrationProperty>();

            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();

            try
            {
                _objDataWrapper.AddParameter("@UserCourseId", courseId);
                _dataSet       = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetUserList");
                userListObject = BindUserListObject(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserListByCourseId in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(userListObject);
        }
Ejemplo n.º 21
0
        public override int UpdateUserCityDetails(int country, int state, int city, int userId)
        {
            var query = "";

            query           = " AjCountryId=" + country + ",AjStateId=" + state + ",AjCityId=" + city + " where AjUserId=" + userId;
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);

            try
            {
                _objDataWrapper.AddParameter("@Query", query);

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_UpdateCityUserProfile");
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUserCategory in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Ejemplo n.º 22
0
        public override List <QueryProperty> GetAllQueryListByLoan()
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            List <QueryProperty> listQueryProperty = new List <QueryProperty>();

            _dataset = new DataSet();
            try
            {
                _objDataWrapper.AddParameter("@case", QueryType.Loan);
                _dataset          = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetStudentQueryList");
                listQueryProperty = BindQueryObjectList(_dataset.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetAllQueryListByLoan in Query.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(listQueryProperty);
        }
Ejemplo n.º 23
0
        public override List <LoanDetailsProperty> GetLoanListByLoan(int LoanId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            var objLoanList = new List <LoanDetailsProperty>();

            try
            {
                _objDataWrapper.AddParameter("@LoanId", LoanId);
                _dataSet    = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetLoanList");
                objLoanList = BindLoanList(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetLoanListByLoan in Bank.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objLoanList);
        }
Ejemplo n.º 24
0
        public override List <StateProperty> GetStateByZone(int zoneId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var objStateList = new List <StateProperty>();

            _dataSet = new DataSet();
            try
            {
                _objDataWrapper.AddParameter("@ZoneId", zoneId);
                _dataSet     = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetStateListByZone");
                objStateList = BindStateObject(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing GetStateByStateId in State.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objStateList);
        }
Ejemplo n.º 25
0
        public override List <CollegeSpeechProperty> GetCollegeSpeechByCourseId(int courseId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            var objCollegeGroupList = new List <CollegeSpeechProperty>();

            try
            {
                _objDataWrapper.AddParameter("@CourseId", courseId);
                _dataSet            = _objDataWrapper.ExecuteDataSet("Aj_GetCollegeSpeechList");
                objCollegeGroupList = BindCollegeSpeechObjectList(_dataSet.Tables[0]);
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetCollegeSpeechByCourseId in CollegeSpeech.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objCollegeGroupList);
        }
Ejemplo n.º 26
0
        public void Publish(string exceptionInfo, string additionalInfo)
        {
            string    connectString  = System.Configuration.ConfigurationManager.AppSettings["DB_CON_STRING"].ToString();
            DbWrapper objDataWrapper = new DbWrapper(System.Configuration.ConfigurationManager.AppSettings["DB_CON_STRING"].ToString(), CommandType.StoredProcedure);


            try
            {
                objDataWrapper.AddParameter("@exceptionInfo", exceptionInfo);
                objDataWrapper.AddParameter("@additionalInfo", additionalInfo);
                int i = objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertException");
            }
            catch (Exception ex)
            {
                WriteLogFile(exceptionInfo + "," + additionalInfo + ex.ToString());
            }
        }
Ejemplo n.º 27
0
        public override int UpdateUserProfile(string value, string field, int userId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);

            try
            {
                if (field != "AjUserDOB")
                {
                    _objDataWrapper.AddParameter("@Value", value);
                }
                else
                {
                    _objDataWrapper.AddParameter("@Value", Common.GetDateFromString(value));
                }
                _objDataWrapper.AddParameter("@Field", field);
                _objDataWrapper.AddParameter("@CreatedBy", userId);
                var errmsg = "";
                var errMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_UpdateUserProfile");

                if (errMsg != null && errMsg.Value != null)
                {
                    errmsg = Convert.ToString(errMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUserCategory in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Ejemplo n.º 28
0
        public override string GetUserPassword(string emailId, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            string Password  = "";
            var    objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserEmailId", emailId);
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var objPassword =
                    (SqlParameter)(_objDataWrapper.AddParameter("@Password", "", SqlDbType.VarChar, ParameterDirection.Output, 64));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_GetUserPassword");
                if (ObjErrMsg != null && ObjErrMsg.Value != null)
                {
                    errmsg = Convert.ToString(ObjErrMsg.Value);
                }
                if (objPassword != null && objPassword.Value != null)
                {
                    Password = Convert.ToString(objPassword.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetUserPassword in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(!string.IsNullOrEmpty(Password)? objCrypto.Decrypt(Password):"");
        }
Ejemplo n.º 29
0
        public List <ClsDBTablesAttributes> GetAllColumnsOfTable(string _strTableName, string AutoIncrementedColumnName)
        {
            DbWrapper objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            DataSet   ds             = new DataSet();

            List <ClsDBTablesAttributes> _objListClsDBTables = new List <ClsDBTablesAttributes>();

            objDataWrapper.AddParameter("@TableName", _strTableName);
            objDataWrapper.AddParameter("@AutoIncrementedColumnName", AutoIncrementedColumnName);
            ds = objDataWrapper.ExecuteDataSet("Aj_Proc_GetColumnsOfTable");


            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                ClsDBTablesAttributes _objClsDBTablesAttributes = new ClsDBTablesAttributes();
                _objClsDBTablesAttributes.PropColumnName         = ds.Tables[0].Rows[i]["column_name"].ToString();
                _objClsDBTablesAttributes.PropDataType           = ds.Tables[0].Rows[i]["data_type"].ToString();
                _objClsDBTablesAttributes.PropColumnDTCharLength = ds.Tables[0].Rows[i]["charLength"].ToString();
                _objListClsDBTables.Add(_objClsDBTablesAttributes);
            }


            return(_objListClsDBTables);
        }
Ejemplo n.º 30
0
        public override int UpdateCourseByUser(UserRegistrationProperty objUserCategoryProperty, int modifiedBy)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);

            try
            {
                _objDataWrapper.AddParameter("@CourseId", objUserCategoryProperty.CourseId);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_UpdateCourseByUser");
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateCourseByUser in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }