Exemplo n.º 1
0
        public override string InsertPackage(string packageName, int courseId, string factorId, bool isChargable, bool isVisible, int amount)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            string errMsg = "";

            try
            {
                _objDataWrapper.AddParameter("@PackageName", packageName);
                _objDataWrapper.AddParameter("@FactorId", factorId);
                _objDataWrapper.AddParameter("@IsVisible", isVisible);
                _objDataWrapper.AddParameter("@IsPackageChargeable", isChargable);
                _objDataWrapper.AddParameter("@PackageAmount", amount);
                _objDataWrapper.AddParameter("@CourseId", courseId);
                var ObjErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@errMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_InsertPackageDetails");
                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 InsertPackage in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }

            return(errMsg);
        }
Exemplo n.º 2
0
        public override List <CoursePaymentMasterProperty> GetCoursePaymentById(int PaymentCourseId)
        {
            var coursePaymentMasterList = new List <CoursePaymentMasterProperty>();

            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            try
            {
                _objDataWrapper.AddParameter("@PaymentCourseId", PaymentCourseId);
                _dataSet = _objDataWrapper.ExecuteDataSet("Aj_Proc_GetCoursePaymentMasterList");
                coursePaymentMasterList = BindCoursePaymentMasterObject(_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 GetCoursePaymentById in Course.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(coursePaymentMasterList);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        private List <CourseMasterProperty> BindCourseHome(DataTable dataTable)
        {
            var courseMasterObjectList = new List <CourseMasterProperty>();

            try
            {
                if (dataTable.Rows.Count > 0)
                {
                    for (var j = 0; j < dataTable.Rows.Count; j++)
                    {
                        var objCoursemaster = new CourseMasterProperty
                        {
                            CourseId = (dataTable.Rows[j]["AjCourseId"] is DBNull) ? 0 :
                                       Convert.ToInt32(dataTable.Rows[j]["AjCourseId"]),
                            CourseName =
                                (dataTable.Rows[j]["AjCourseName"] is DBNull) ? null :
                                Convert.ToString(dataTable.Rows[j]["AjCourseName"])
                        };
                        courseMasterObjectList.Add(objCoursemaster);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindCourseMasterObject in Course.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(courseMasterObjectList);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
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);
        }
Exemplo n.º 7
0
 // method to Insert the country
 public override int InsertCountry(string countryname, int createdby, out string errMsg, string countrycode = null)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errMsg          = string.Empty;
     try
     {
         _objDataWrapper.AddParameter("@CountryName", countryname);
         _objDataWrapper.AddParameter("@CountryCode", countrycode);
         _objDataWrapper.AddParameter("@createdBy", createdby);
         var objErrMsg =
             (SqlParameter)
             (_objDataWrapper.AddParameter("@errmsg", "", SqlDbType.VarChar, ParameterDirection.Output, 64));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateCountryDetails");
         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 InsertCountry in Country.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Exemplo n.º 8
0
        public override List <CityProperty> GetCityDetailsByName(string cityName)
        {
            _dataSet        = new DataSet();
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            var objCityList = new List <CityProperty>();

            try
            {
                _objDataWrapper.AddParameter("@CityName", cityName);
                _dataSet    = _objDataWrapper.ExecuteDataSet("Aj_GetCityList");
                objCityList = BindCityObject(_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 GetCityDetailsByName in City.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objCityList);
        }
Exemplo n.º 9
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);
 }
Exemplo n.º 10
0
        // private method to bind The Object List Of The university Categoty object
        private List <BO.UniversityCategoryProperty> BindUniversityCategoryObject(DataTable datatable)
        {
            var objUniversityCategoryList = new List <BO.UniversityCategoryProperty>();

            try
            {
                if (datatable != null && datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objUniversityCategory = new BO.UniversityCategoryProperty
                        {
                            UniversityCategoryId   = Convert.ToInt32(datatable.Rows[j]["AjUniversityCategoryId"]),
                            UniversityCategoryName = Convert.ToString(datatable.Rows[j]["AjUniversityCategoryName"])
                        };
                        objUniversityCategoryList.Add(objUniversityCategory);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindUniversityCategoryObject in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objUniversityCategoryList);
        }
Exemplo n.º 11
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);
        }
Exemplo n.º 12
0
        public override List <BO.UniversityProperty> GetUniversityListByCategory(int universityCategoryId)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            _dataSet        = new DataSet();
            var objUniversityList = new List <BO.UniversityProperty>();

            try
            {
                _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 GetUniversityListByCategory in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objUniversityList);
        }
Exemplo n.º 13
0
        private List <LoanRange> BindLoanRange(DataTable datatable)
        {
            var objLoanRange = new List <LoanRange>();

            try
            {
                if (datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objLoanRangeProperty = new LoanRange
                        {
                            LoanRangeId  = Convert.ToInt32(datatable.Rows[j]["AjLoanRangeId"]),
                            StudyPlaceId = Convert.ToInt32(datatable.Rows[j]["AjStudyPlaceId"]),
                            Amount       = Convert.ToString(datatable.Rows[j]["AjAmount"]),
                        };
                        objLoanRange.Add(objLoanRangeProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindStudyPlaceList in Bank.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objLoanRange);
        }
Exemplo n.º 14
0
        public override string UpdateFactor(int factorId, string factorName, string factorRemar, bool isChargable, bool isVisible)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            string errMsg = "";

            try
            {
                _objDataWrapper.AddParameter("@AjFactorId", factorId);
                _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 UpdateFactor in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(errMsg);
        }
Exemplo n.º 15
0
        private List <UserRegistrationProperty> BindUserListObject(DataTable datatable)
        {
            var userListObject = new List <UserRegistrationProperty>();
            var objCrypto      = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                if (datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objUserProperty = new UserRegistrationProperty
                        {
                            CityId                    = (datatable.Rows[j]["AjCityId"] is DBNull)?0:Convert.ToInt32(datatable.Rows[j]["AjCityId"]),
                            CityName                  = (datatable.Rows[j]["AjCityName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCityName"]),
                            CountryCode               = (datatable.Rows[j]["AjCountryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjCountryId"]),
                            CountryName               = (datatable.Rows[j]["AjCountryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCountryName"]),
                            PhoneNo                   = (datatable.Rows[j]["AjUserPhoneNo"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPhoneNo"]),
                            MobileNo                  = (datatable.Rows[j]["AjUserMobile"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserMobile"]),
                            StateId                   = (datatable.Rows[j]["AjStateId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjStateId"]),
                            StateName                 = (datatable.Rows[j]["AjStateName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStateName"]),
                            UserCategoryId            = (datatable.Rows[j]["AjUserCategoryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUserCategoryId"]),
                            UserCategoryName          = (datatable.Rows[j]["AjUserCategoryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserCategoryName"]),
                            UserCorrespondenceAddress = (datatable.Rows[j]["AjUserMailingAddress"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserMailingAddress"]),
                            UserEmailid               = (datatable.Rows[j]["AjUserEmail"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserEmail"]),
                            UserFullName              = (datatable.Rows[j]["AjUserFullName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserFullName"]),
                            UserId                    = (datatable.Rows[j]["AjUserId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUserId"]),
                            UserPermanentAddress      = (datatable.Rows[j]["AjUserPermanentAddress"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPermanentAddress"]),
                            UserPincode               = (datatable.Rows[j]["AjUserPincode"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPincode"]),
                            CourseId                  = (datatable.Rows[j]["AjCourseId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjCourseId"]),
                            CourseName                = (datatable.Rows[j]["AjCourseName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCourseName"]),
                            UserGender                = (datatable.Rows[j]["AjUserGender"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserGender"]),
                            UserDOB                   = (datatable.Rows[j]["AjUserDOB"] is DBNull) ? System.DateTime.Now : Convert.ToDateTime(datatable.Rows[j]["AjUserDOB"]),
                            UserPassword              = objCrypto.Decrypt((datatable.Rows[j]["AjUserPassword"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserPassword"])),

                            UserImage             = (datatable.Rows[j]["AjUserImage"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUserImage"]),
                            ApplicationFormNumber = datatable.Columns.Contains("AjStudentFormNumber")?((datatable.Rows[j]["AjStudentFormNumber"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStudentFormNumber"])):null,

                            StudentPaymentStatus = datatable.Columns.Contains("AjStudentPaymentStatus") ? ((datatable.Rows[j]["AjStudentPaymentStatus"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStudentPaymentStatus"])) : null,
                            UserStatus           = datatable.Columns.Contains("AjUserStatus") ? ((datatable.Rows[j]["AjUserStatus"] is DBNull) ? false : Convert.ToBoolean(datatable.Rows[j]["AjUserStatus"])) : false,
                        };
                        userListObject.Add(objUserProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindUserCategoryListObject in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(userListObject);
        }
Exemplo n.º 16
0
        private List <ExamFormProperty> BindExamFormListObject(DataTable dataTable)
        {
            var examFormPropertyList = new List <ExamFormProperty>();

            try
            {
                if (dataTable.Rows.Count > 0)
                {
                    for (var j = 0; j < dataTable.Rows.Count; j++)
                    {
                        var objExamFormProperty = new ExamFormProperty {
                            CourseId                    = Convert.ToInt32(dataTable.Rows[j]["AjCourseId"]),
                            CourseName                  = Convert.ToString(dataTable.Rows[j]["AjCourseName"]),
                            ExamFormCenter              = Convert.ToString(dataTable.Rows[j]["AjExamFormCenter"]),
                            ExamFormDd                  = Convert.ToString(dataTable.Rows[j]["AjExamFormDD"]),
                            ExamFormId                  = Convert.ToInt32(dataTable.Rows[j]["AjExamFormId"]),
                            ExamFormKeywords            = Convert.ToString(dataTable.Rows[j]["AjExamFormMetaTag"]),
                            ExamFormMetaDesc            = Convert.ToString(dataTable.Rows[j]["AjExamFormMetaDesc"]),
                            ExamFormPrice               = Convert.ToString(dataTable.Rows[j]["AjExamFormPrice"]),
                            ExamFormResultDate          = Convert.ToString(dataTable.Rows[j]["AjExamFormResultDate"]),
                            ExamFormResultDateReamrk    = Convert.ToString(dataTable.Rows[j]["AjExamFormResultDateRemark"]),
                            ExamFormResultWebsite       = Convert.ToString(dataTable.Rows[j]["AjExamFormResultWebsite"]),
                            ExamFormSaleEndDate         = Convert.ToString(dataTable.Rows[j]["AjExamFormSaleEndDate"]),
                            ExamFormSaleEndDateRemark   = Convert.ToString(dataTable.Rows[j]["AjExamFormSaleEndDateRemark"]),
                            ExamFormSaleStartDate       = Convert.ToString(dataTable.Rows[j]["AjExamFormSaleStartDate"]),
                            ExamFormStatus              = Convert.ToBoolean(dataTable.Rows[j]["AjExamFormStatus"]),
                            ExamFormStore               = Convert.ToString(dataTable.Rows[j]["AjExamFormStore"]),
                            ExamFormSubject             = Convert.ToString(dataTable.Rows[j]["AjExamFormSubject"]),
                            ExamFormSubmitDate          = Convert.ToString(dataTable.Rows[j]["AjExamFormSubmitDate"]),
                            ExamFormSubmitDateRemark    = Convert.ToString(dataTable.Rows[j]["AjExamFormSubmitDateRemark"]),
                            ExamFormSyllabus            = Convert.ToString(dataTable.Rows[j]["AjExamFormSyllabus"]),
                            ExamFormTitle               = Convert.ToString(dataTable.Rows[j]["AjExamFormTitle"]),
                            ExamFormUrl                 = Convert.ToString(dataTable.Rows[j]["AjExamFormUrl"]),
                            ExamFormWebsite             = Convert.ToString(dataTable.Rows[j]["AjExamFormWebsite"]),
                            ExamFormYear                = Convert.ToString(dataTable.Rows[j]["AjExamFormYear"]),
                            ExamFromSaleStartDateRemark = Convert.ToString(dataTable.Rows[j]["AjExamFormSaleStartDateRemark"]),
                            ExamId   = Convert.ToInt32(dataTable.Rows[j]["AjExamId"]),
                            ExamName = Convert.ToString(dataTable.Rows[j]["AjExamName"])
                        };
                        examFormPropertyList.Add(objExamFormProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindExamFormListObject in Exam.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(examFormPropertyList);
        }
Exemplo n.º 17
0
        public override int UpdateUserInfo(UserRegistrationProperty objUserRegistrationProperty, int modifiedBy, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";
            var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));

            try
            {
                _objDataWrapper.AddParameter("@UserCityId", objUserRegistrationProperty.CityId);
                _objDataWrapper.AddParameter("@UserCountryId", objUserRegistrationProperty.CountryCode);
                _objDataWrapper.AddParameter("@UserPhone", objUserRegistrationProperty.PhoneNo);
                _objDataWrapper.AddParameter("@UserStateId", objUserRegistrationProperty.StateId);
                _objDataWrapper.AddParameter("@UserCatId", objUserRegistrationProperty.UserCategoryId);
                _objDataWrapper.AddParameter("@UserCorssAddrs", objUserRegistrationProperty.UserCorrespondenceAddress);
                _objDataWrapper.AddParameter("@UserEmailId", objUserRegistrationProperty.UserEmailid);
                _objDataWrapper.AddParameter("@UserFullName", objUserRegistrationProperty.UserFullName);
                _objDataWrapper.AddParameter("@UserPassword", objCrypto.Encrypt(objUserRegistrationProperty.UserPassword));
                _objDataWrapper.AddParameter("@UserMobileNo", objUserRegistrationProperty.MobileNo);
                _objDataWrapper.AddParameter("@UserPerAddrs", objUserRegistrationProperty.UserPermanentAddress);
                _objDataWrapper.AddParameter("@UserPincode", objUserRegistrationProperty.UserPincode);
                _objDataWrapper.AddParameter("@UserStatus", objUserRegistrationProperty.UserStatus);
                _objDataWrapper.AddParameter("@SubUserId", objUserRegistrationProperty.UserSubId);
                _objDataWrapper.AddParameter("@UserCourseId", objUserRegistrationProperty.CourseId);
                _objDataWrapper.AddParameter("@UserGender", objUserRegistrationProperty.UserGender);
                _objDataWrapper.AddParameter("@UserDOB", objUserRegistrationProperty.UserDOB);
                _objDataWrapper.AddParameter("@UserFatherName", objUserRegistrationProperty.UserFatherName);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
                var objerrMsg
                    = (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var objUserId
                    = (SqlParameter)(_objDataWrapper.AddParameter("@UserId", objUserRegistrationProperty.UserId, SqlDbType.Int, ParameterDirection.Input));

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateUserDetails");
                if (objerrMsg != null && objerrMsg.Value != null)
                {
                    errmsg = Convert.ToString(objerrMsg.Value);
                }
                if (objUserId != null && objUserId.Value != null)
                {
                    objUserRegistrationProperty.UserId = Convert.ToInt32(objUserId.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing UpdateUserInfo in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Exemplo n.º 18
0
        private List <BO.UniversityProperty> BindUniversityObject(DataTable datatable)
        {
            var objUniversityList = new List <BO.UniversityProperty>();

            try
            {
                if (datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objUniversity = new BO.UniversityProperty
                        {
                            UniversityAddrs        = (datatable.Rows[j]["AjUniversityAddress"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityAddress"]),
                            UniversityCategoryId   = (datatable.Rows[j]["AjUniversityCategoryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityCategoryId"]),
                            UniversityCategoryName = (datatable.Rows[j]["AjUniversityCategoryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityCategoryName"]),
                            UniversityCityId       = (datatable.Rows[j]["AjUniversityCityId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityCityId"]),
                            UniversityCityName     = (datatable.Rows[j]["AjCityName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCityName"]),
                            UniversityCountryId    = (datatable.Rows[j]["AjUniversityCountryId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityCountryId"]),
                            UniversityCountryName  = (datatable.Rows[j]["AjCountryName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjCountryName"]),
                            UniversityDesc         = (datatable.Rows[j]["AjUniversityDesc"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityDesc"]),
                            UniversityEmailId      = (datatable.Rows[j]["AjUniversityEmailId"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityEmailId"]),
                            UniversityEst          = (datatable.Rows[j]["AjUniversityEst"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityEst"]),
                            UniversityFax          = (datatable.Rows[j]["AjUniversityFax"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityFax"]),
                            UniversityId           = (datatable.Rows[j]["AjUniversityId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityId"]),
                            UniversityLogo         = (datatable.Rows[j]["AjUniversityLogo"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityLogo"]),
                            UniversityMetaDesc     = (datatable.Rows[j]["AjUniversityMetaDesc"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityMetaDesc"]),
                            UniversityMetaTag      = (datatable.Rows[j]["AjUniversityMetaTag"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityMetaTag"]),
                            UniversityMobile       = (datatable.Rows[j]["AjUniversityMobile"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityMobile"]),
                            UniversityName         = (datatable.Rows[j]["AjUniversityName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityName"]),
                            UniversityPhoneNo      = (datatable.Rows[j]["AJuniversityPhone"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AJuniversityPhone"]),
                            UniversityPopularName  = (datatable.Rows[j]["AjUniversityPopularName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityPopularName"]),
                            UniversityshortName    = (datatable.Rows[j]["AjUniversityShortName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityShortName"]),
                            UniversityStateId      = (datatable.Rows[j]["AjUniversityStateId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjUniversityStateId"]),
                            UniversityStateName    = (datatable.Rows[j]["AjStateName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStateName"]),
                            UniversityTitle        = (datatable.Rows[j]["AjUniversityTitle"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityTitle"]),
                            UniversityUrl          = (datatable.Rows[j]["AjUniversityUrl"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityUrl"]),
                            UniversityWebsite      = (datatable.Rows[j]["AjUniversityWebsite"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjUniversityWebsite"])
                        };
                        objUniversityList.Add(objUniversity);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindUniversityObject in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objUniversityList);
        }
Exemplo n.º 19
0
        public override int UpdateExamFormDetails(ExamFormProperty objExamFormProperty, int modifiedBy, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = string.Empty;
            try
            {
                _objDataWrapper.AddParameter("@EaxmFormId", objExamFormProperty.ExamFormId);
                _objDataWrapper.AddParameter("@ExamId", objExamFormProperty.ExamId);
                _objDataWrapper.AddParameter("@ExamFormUrl", objExamFormProperty.ExamFormUrl);
                _objDataWrapper.AddParameter("@ExamFormTitle", objExamFormProperty.ExamFormTitle);
                _objDataWrapper.AddParameter("@ExamFormMetaDesc", objExamFormProperty.ExamFormMetaDesc);
                _objDataWrapper.AddParameter("@ExamFormMetaTag", objExamFormProperty.ExamFormKeywords);
                _objDataWrapper.AddParameter("@ExamFormSubject", objExamFormProperty.ExamFormSubject);
                _objDataWrapper.AddParameter("@ExamFormYear", objExamFormProperty.ExamFormYear);
                _objDataWrapper.AddParameter("@ExamFormWebsite", objExamFormProperty.ExamFormWebsite);
                _objDataWrapper.AddParameter("@ExamFormSalesStartDate", objExamFormProperty.ExamFormSaleStartDate);
                _objDataWrapper.AddParameter("@ExamFormSalesStartDateReamrk", objExamFormProperty.ExamFromSaleStartDateRemark);
                _objDataWrapper.AddParameter("@ExamFormSalesEndDate", objExamFormProperty.ExamFormSaleEndDate);
                _objDataWrapper.AddParameter("@ExamFormSalesEndDateReamrk", objExamFormProperty.ExamFormSaleEndDateRemark);
                _objDataWrapper.AddParameter("@ExamFormSubmitDate", objExamFormProperty.ExamFormSubmitDate);
                _objDataWrapper.AddParameter("@ExamFormSubmitDateReamrk", objExamFormProperty.ExamFormSubmitDateRemark);
                _objDataWrapper.AddParameter("@ExamFormResultDate", objExamFormProperty.ExamFormResultDate);
                _objDataWrapper.AddParameter("@ExamFormResultDateRemark", objExamFormProperty.ExamFormResultDateReamrk);
                _objDataWrapper.AddParameter("@ExamFormResultWebsite", objExamFormProperty.ExamFormResultWebsite);
                _objDataWrapper.AddParameter("@ExamFormPrice", objExamFormProperty.ExamFormPrice);
                _objDataWrapper.AddParameter("@ExamFormStore", objExamFormProperty.ExamFormStore);
                _objDataWrapper.AddParameter("@ExamFromCenter", objExamFormProperty.ExamFormCenter);
                _objDataWrapper.AddParameter("@ExamFromDD", objExamFormProperty.ExamFormDd);
                _objDataWrapper.AddParameter("@ExamFromSyllabus", objExamFormProperty.ExamFormSyllabus);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
                _objDataWrapper.AddParameter("@AjExamFormStatus", objExamFormProperty.ExamFormStatus);

                var objErrmsg =
                    (SqlParameter)
                    (_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateExamFormDetails");
                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 UpdateExamFormDetails in Exam.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Exemplo n.º 20
0
        public override int UpdateUniversityDetails(BO.UniversityProperty objUniversityProerty, int modifiedBy, out string errmsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = "";

            try
            {
                _objDataWrapper.AddParameter("@UniversityId", objUniversityProerty.UniversityId);
                _objDataWrapper.AddParameter("@UniversityName", objUniversityProerty.UniversityName);
                _objDataWrapper.AddParameter("@UniversityUrl", objUniversityProerty.UniversityUrl);
                _objDataWrapper.AddParameter("@UniversityTitle", objUniversityProerty.UniversityTitle);
                _objDataWrapper.AddParameter("@UniversityMetaDesc", objUniversityProerty.UniversityMetaDesc);
                _objDataWrapper.AddParameter("@UniversityCategoryId", objUniversityProerty.UniversityCategoryId);
                _objDataWrapper.AddParameter("@UniversityMetaTag", objUniversityProerty.UniversityMetaTag);
                _objDataWrapper.AddParameter("@UniversityDesc", objUniversityProerty.UniversityDesc);
                _objDataWrapper.AddParameter("@UniversityLogo", objUniversityProerty.UniversityLogo);
                _objDataWrapper.AddParameter("@UniversityWebsite", objUniversityProerty.UniversityWebsite);
                _objDataWrapper.AddParameter("@UniversityEst", objUniversityProerty.UniversityEst);
                _objDataWrapper.AddParameter("@UniversityPhone", objUniversityProerty.UniversityPhoneNo);
                _objDataWrapper.AddParameter("@UniversityMobile", objUniversityProerty.UniversityMobile);
                _objDataWrapper.AddParameter("@UniversityEmailId", objUniversityProerty.UniversityEmailId);
                _objDataWrapper.AddParameter("@UniversityPopularName", objUniversityProerty.UniversityPopularName);
                _objDataWrapper.AddParameter("@UniversityShortName", objUniversityProerty.UniversityshortName);
                _objDataWrapper.AddParameter("@UniversityFax", objUniversityProerty.UniversityFax);
                _objDataWrapper.AddParameter("@UniversityAddrs", objUniversityProerty.UniversityAddrs);
                _objDataWrapper.AddParameter("@UniversityCountryId", objUniversityProerty.UniversityCountryId);
                _objDataWrapper.AddParameter("@UniversityStateId", objUniversityProerty.UniversityStateId);
                _objDataWrapper.AddParameter("@UniversityCityId", objUniversityProerty.UniversityCityId);
                _objDataWrapper.AddParameter("@CreatedBy", modifiedBy);
                var objErrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));

                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateUniversityDetails");
                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 UpdateUniversityDetails in University.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Exemplo n.º 21
0
        public override int InsertBankInfo(BankDetailsProperty objBankProperty, int createdBy, out string errmsg,
                                           out int bankId)
        {
            bankId          = 0;
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errmsg          = string.Empty;
            try
            {
                _objDataWrapper.AddParameter("@BankName", objBankProperty.BankName);
                _objDataWrapper.AddParameter("@BankShortName", objBankProperty.BankShortName);
                _objDataWrapper.AddParameter("@BankUrl", objBankProperty.BankUrl);
                _objDataWrapper.AddParameter("@BankAddress", objBankProperty.BankAddress);
                _objDataWrapper.AddParameter("@BankPhoneNo", objBankProperty.BankPhoneNo);
                _objDataWrapper.AddParameter("@BankLogo", objBankProperty.BankLogo);
                _objDataWrapper.AddParameter("@BankShortDescription", objBankProperty.BankShortDescription);
                _objDataWrapper.AddParameter("@BankContactPerson", objBankProperty.BankContactPerson);
                _objDataWrapper.AddParameter("@BankContactPersonDesignation", objBankProperty.BankContactPersonDesignation);
                _objDataWrapper.AddParameter("@BankContactPersonEmailId", objBankProperty.BankContactPersonEmailId);
                _objDataWrapper.AddParameter("@BankContactPersonMobile", objBankProperty.BankContactPersonMobile);
                _objDataWrapper.AddParameter("@CreatedBy", createdBy);
                var objBankId =
                    (SqlParameter)(_objDataWrapper.AddParameter("@BankId", objBankProperty.BankId, SqlDbType.Int, ParameterDirection.InputOutput));

                var objErrmsg =
                    (SqlParameter)
                    (_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.NVarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateBankDetails");
                if (objErrmsg != null && objErrmsg.Value != null)
                {
                    errmsg = Convert.ToString(objErrmsg.Value);
                }
                if (objBankId != null && objBankId.Value != null)
                {
                    bankId = Convert.ToInt32(objBankId.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertBankInfo in Bank.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }

            return(_i);
        }
Exemplo n.º 22
0
        public string[] CountTotalSheets(string file)
        {
            int             i = 0;
            OleDbConnection consrc;

            String[] excelSheets = new String[0];
            string   consrcstr   = file.EndsWith(".xls") ? Common.OleCnnString : Common.OleCnnString2007;

            consrcstr = consrcstr + file;
            consrc    = new OleDbConnection(consrcstr);
            DataSet ds = new DataSet();

            try
            {
                if (consrc.State == ConnectionState.Closed)
                {
                    consrc.Open();
                }

                DataTable dt = consrc.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);

                excelSheets = new String[dt.Rows.Count];

                // Add the sheet name to the string array.
                foreach (DataRow row in dt.Rows)
                {
                    excelSheets[i] = row["TABLE_NAME"].ToString();
                    i++;
                }
                consrc.Close();
            }
            catch (Exception ex)
            {
                consrc.Close();
                string err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while CountTotalSheets in ClsOleDBDataWrapper  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            finally
            {
                consrc.Close();
            }
            return(excelSheets);
        }
Exemplo n.º 23
0
        /* End: Constructor.....*/

        public DataTable GetRecordsForMappedColumnFromCSVToDataTable(string _strTableName, string _strPrimaryKey, string filePath, string[] SeprateColumns)
        {
            dtb = new DataTable();
            var    objClsOledbdatalayer = new ClsOleDBDataWrapper();
            string FileColumnName = "", DBColumnName = "", DBDataType = "", DBSize = "", StrColumn = "";

            foreach (string strColumns in SeprateColumns)
            {
                var arrColumns = strColumns.Split('|');
                FileColumnName = Convert.ToString(arrColumns[0]).Trim();
                DBColumnName   = Convert.ToString(arrColumns[1]).Trim();
                DBDataType     = Convert.ToString(arrColumns[2]).Trim();
                DBSize         = Convert.ToString(arrColumns[3]).Trim();

                StrColumn += FileColumnName + ",";
            }
            StrColumn = StrColumn.TrimEnd(',');

            string location = HttpContext.Current.Server.MapPath("~/Resource/ExcelUpload/" + filePath);



            try
            {
                var excelSheets = objClsOledbdatalayer.CountTotalSheets(location);
                if (excelSheets.Length > 0)
                {
                    foreach (DataTable dt in excelSheets.Select(t => objClsOledbdatalayer.GetExcelSheetValueBasedOnColumn(location, StrColumn, t)).Where(dt => dt.Rows.Count > 0))
                    {
                        dtb = dt.Rows.Cast <DataRow>().Where(row => !row.ItemArray.All(field => field is System.DBNull || string.Compare((field as string).Trim(), string.Empty) == 0)).CopyToDataTable();
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing GetRecordsForMappedColumnFromCSVToDataTable in ExcelToDataTable.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }


            return(dtb);
        }
Exemplo n.º 24
0
        private List <PackageFactorMaster> BindFactorByPackage(DataTable datatable)
        {
            var objPackageFactorList = new List <PackageFactorMaster>();

            try
            {
                if (datatable != null && datatable.Rows.Count > 0)
                {
                    var objPackageFactor    = new PackageFactorMaster();
                    var objPackage          = new PackageMaster();
                    var objFactorMasterList = new List <PackageFactor>();
                    var objPackageFactorID  = new List <int>();
                    objPackage.PackageId        = (datatable.Rows[0]["AjPackageId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[0]["AjPackageId"]);
                    objPackage.PackageName      = (datatable.Rows[0]["PackageName"] is DBNull) ? "" : Convert.ToString(datatable.Rows[0]["PackageName"]);
                    objPackage.PackageAmount    = (datatable.Rows[0]["PackageAmount"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[0]["PackageAmount"]);
                    objPackage.IsChargeable     = (datatable.Rows[0]["IsPackageChargeable"] is DBNull) ? false : Convert.ToBoolean(datatable.Rows[0]["IsPackageChargeable"]);
                    objPackage.IsVisible        = (datatable.Rows[0]["IsVisible"] is DBNull) ? false : Convert.ToBoolean(datatable.Rows[0]["IsVisible"]);
                    objPackage.courseId         = (datatable.Rows[0]["AjCourseId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[0]["AjCourseId"]);
                    objPackage.CourseName       = (datatable.Rows[0]["AjCourseName"] is DBNull) ? null : Convert.ToString(datatable.Rows[0]["AjCourseName"]);
                    objPackageFactor.objPackage = objPackage;
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var packageFactorId  = (datatable.Rows[j]["AjPackageFactorId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjPackageFactorId"]);
                        var objPackageMaster = new PackageFactor();
                        objPackageMaster.FactorID   = (datatable.Rows[j]["FactorId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["FactorId"]);
                        objPackageMaster.FactorName = (datatable.Rows[j]["AjFactorName"] is DBNull) ? "" : Convert.ToString(datatable.Rows[j]["AjFactorName"]);
                        objPackageFactorID.Add(packageFactorId);
                        objFactorMasterList.Add(objPackageMaster);
                    }
                    objPackageFactor.ObjPackageFactor = objFactorMasterList;
                    objPackageFactor.PackageFactorId  = objPackageFactorID;
                    objPackageFactorList.Add(objPackageFactor);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindFactorByPackage in FormFackageFactor.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objPackageFactorList);
        }
Exemplo n.º 25
0
        // Method to bind the QueryList
        private List <QueryProperty> BindQueryObjectList(DataTable datatable)
        {
            List <QueryProperty> listQueryProperty = new List <QueryProperty>();

            try
            {
                if (datatable != null && datatable.Rows.Count > 0)
                {
                    for (int i = 0; i < datatable.Rows.Count; i++)
                    {
                        var objQueryProperty = new QueryProperty
                        {
                            UserId            = Convert.ToInt32(datatable.Rows[i]["AjUserId"]),
                            UserMobileNo      = Convert.ToString(datatable.Rows[i]["AjUserMobile"]),
                            UserEmailId       = Convert.ToString(datatable.Rows[i]["AjUserEmail"]),
                            StudentSourceId   = Convert.ToInt32(datatable.Rows[i]["SourceId"]),
                            StudentCourseId   = Convert.ToInt32(datatable.Rows[i]["AjCourseId"]),
                            StudentCourseName = Convert.ToString(datatable.Rows[i]["CourseName"]),
                            StudentName       = Convert.ToString(datatable.Rows[i]["AjUserFullName"]),
                            StudentQuery      = Convert.ToString(datatable.Rows[i]["AjStudentQueryText"]),
                            SourceTypeName    = Convert.ToString(datatable.Rows[i]["Source"]),
                            StudentQueryId    = Convert.ToString(datatable.Rows[i]["AjStudentQueryId"]),
                            StudentCityName   = Convert.ToString(datatable.Rows[i]["AjCityName"]),
                            SourceName        = Convert.ToString(datatable.Rows[i]["SourceName"]),
                            ReplyStatus       = Convert.ToBoolean(datatable.Rows[i]["AjStudentQueryReplyStatus"]),
                            QueryReply        = datatable.Columns.Contains("AjQueryReply") == true ? ((datatable.Rows[i]["AjQueryReply"] is DBNull) ? null : Convert.ToString(datatable.Rows[i]["AjQueryReply"])) : null,
                            CreatedOn         = Convert.ToDateTime(datatable.Rows[i]["CreatedOn"]),
                            QueryStatus       = datatable.Columns.Contains("AjQueryStatus") == true ? ((datatable.Rows[i]["AjQueryStatus"] is DBNull) ? false : Convert.ToBoolean(datatable.Rows[i]["AjQueryStatus"])) : false,
                        };
                        listQueryProperty.Add(objQueryProperty);
                    }
                }
            }
            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(listQueryProperty);
        }
Exemplo n.º 26
0
        // This is private member that will bind the Coutse stream Object List
        private List <CourseStreamProperty> BindStreamObjectList(DataTable datatable)
        {
            var courseStreamObjectList = new List <CourseStreamProperty>();


            try
            {
                if (datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objCourseStream = new CourseStreamProperty
                        {
                            CourseId                    = Convert.ToInt32(datatable.Rows[j]["AjCourseId"]),
                            CourseName                  = Convert.ToString(datatable.Rows[j]["AjCourseName"]),
                            CourseSteamFuture           = Convert.ToString(datatable.Rows[j]["AjCourseStreamFuture"]),
                            CourseStreamCoreCompanies   = Convert.ToString(datatable.Rows[j]["AjCourseStreamCoreCompanies"]),
                            CourseStreamDesc            = Convert.ToString(datatable.Rows[j]["AjCourseStreamDesc"]),
                            CourseStreamHistory         = Convert.ToString(datatable.Rows[j]["AjCourseStreamHistory"]),
                            CourseStreamMetaDesc        = Convert.ToString(datatable.Rows[j]["AjCourseStreamMetaDesc"]),
                            CourseStreamMetaTag         = Convert.ToString(datatable.Rows[j]["AjCourseStreamMetaTag"]),
                            CourseStreamName            = Convert.ToString(datatable.Rows[j]["AjCourseStreamName"]),
                            CourseStreamRelatedIndustry = Convert.ToString(datatable.Rows[j]["AjCourseStreamRelatedIndustry"]),
                            CourseStreamStatus          = Convert.ToBoolean(datatable.Rows[j]["AjCourseStreamStatus"]),
                            CourseStreamTitle           = Convert.ToString(datatable.Rows[j]["AjCourseStreamTitle"]),
                            CourseStreamUrl             = Convert.ToString(datatable.Rows[j]["AjCourseStreamUrl"]),
                            StreamId                    = Convert.ToInt32(datatable.Rows[j]["AjCourseStreamId"])
                        };
                        courseStreamObjectList.Add(objCourseStream);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindStreamObjectList in Stream.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(courseStreamObjectList);
        }
Exemplo n.º 27
0
        private List <ExamProperty> BindExamListObject(DataTable dataTable)
        {
            var examObjectList = new List <ExamProperty>();

            try
            {
                if (dataTable.Rows.Count > 0)
                {
                    for (var j = 0; j < dataTable.Rows.Count; j++)
                    {
                        var objExamProperty = new ExamProperty
                        {
                            ExamId                 = Convert.ToInt32(dataTable.Rows[j]["AjExamId"]),
                            CourseName             = Convert.ToString(dataTable.Rows[j]["AjCourseName"]),
                            ExamDesc               = Convert.ToString(dataTable.Rows[j]["AjExamDesc"]),
                            ExamEligiblityCriteria =
                                Convert.ToString(dataTable.Rows[j]["AjExamEligiblityCriteria"]),
                            ExamFullName    = Convert.ToString(dataTable.Rows[j]["AjExamFullName"]),
                            ExamLogo        = Convert.ToString(dataTable.Rows[j]["AjExamLogo"]),
                            ExamName        = Convert.ToString(dataTable.Rows[j]["AjExamName"]),
                            ExamPopularName =
                                Convert.ToString(dataTable.Rows[j]["AjExamPopularName"]),
                            ExamWebSite    = Convert.ToString(dataTable.Rows[j]["AjExamWebsite"]),
                            CourseId       = Convert.ToInt32(dataTable.Rows[j]["AjCourseId"]),
                            ExamStatus     = Convert.ToBoolean(dataTable.Rows[j]["AjExamStatus"]),
                            HelpLineNumber = Convert.ToString(dataTable.Columns.Contains("AjHelpLineNo") ? (dataTable.Rows[j]["AjHelpLineNo"].ToString() != "" ? dataTable.Rows[j]["AjHelpLineNo"] : null) : null),
                        };
                        examObjectList.Add(objExamProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindExamListObject in Exam.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(examObjectList);
        }
Exemplo n.º 28
0
 public override int UpdateCourseMasterDetails(int courseId, string courseName, string courseUrl, string courseTitle, string courseMetaTag, string courseMetaDesc, string courseDesc, string courseshortName, string coursePopularName, int courseCategoryId, int courseEligibiltyId, int createdBy, out string errMsg, string CourseImage, string HelpLineNo, bool courseStatus = false, bool IsBookSeatVisible = true)
 {
     _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
     errMsg          = string.Empty;
     try
     {
         _objDataWrapper.AddParameter("@CourseId", courseId);
         _objDataWrapper.AddParameter("@CourseName", courseName);
         _objDataWrapper.AddParameter("@CourseUrl", courseUrl);
         _objDataWrapper.AddParameter("@CourseTitle", courseTitle);
         _objDataWrapper.AddParameter("@CourseMetaTag", courseMetaTag);
         _objDataWrapper.AddParameter("@CourseMetaDesc", courseMetaDesc);
         _objDataWrapper.AddParameter("@CourseDesc", courseDesc);
         _objDataWrapper.AddParameter("@CourseShortName", courseshortName);
         _objDataWrapper.AddParameter("@CoursePopularName", coursePopularName);
         _objDataWrapper.AddParameter("@CoursecategoryId", courseCategoryId);
         _objDataWrapper.AddParameter("@CourseEligibiltyId", courseEligibiltyId);
         _objDataWrapper.AddParameter("@CourseStatus", courseStatus);
         _objDataWrapper.AddParameter("@CourseImage", CourseImage);
         _objDataWrapper.AddParameter("createdBy", createdBy);
         _objDataWrapper.AddParameter("@AjHelpLineNo", HelpLineNo);
         _objDataWrapper.AddParameter("@AjIsBookSeatVisible", IsBookSeatVisible);
         var objErrmsg =
             (SqlParameter)
             (_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.NVarChar, ParameterDirection.Output, 128));
         _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateCourseMasterDetails");
         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 UpdateCourseMasterDetails in Course.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
     return(_i);
 }
Exemplo n.º 29
0
        private List <LoanDetailsProperty> BindLoanList(DataTable datatable)
        {
            var objLoanList = new List <LoanDetailsProperty>();

            try
            {
                if (datatable != null && datatable.Rows.Count > 0)
                {
                    for (var j = 0; j < datatable.Rows.Count; j++)
                    {
                        var objLoanListProperty = new LoanDetailsProperty
                        {
                            BankId            = (datatable.Rows[j]["AjBankId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjBankId"]),
                            LoanId            = (datatable.Rows[j]["AjLoanId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjLoanId"]),
                            LoanRangeId       = (datatable.Rows[j]["AjLoanRangeId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjLoanRangeId"]),
                            StudyPlaceId      = (datatable.Rows[j]["AjStudyPlaceId"] is DBNull) ? 0 : Convert.ToInt32(datatable.Rows[j]["AjStudyPlaceId"]),
                            Eligibilty        = (datatable.Rows[j]["AjEligibilty"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjEligibilty"]),
                            Security          = (datatable.Rows[j]["AjSecurity"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjSecurity"]),
                            RepaymentDuration = (datatable.Rows[j]["AjRepaymentDuration"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjRepaymentDuration"]),
                            Remark            = (datatable.Rows[j]["AjRemark"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjRemark"]),
                            RateOfInterest    = (datatable.Rows[j]["AjRateOfInterest"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjRateOfInterest"]),
                            ProcessingFees    = (datatable.Rows[j]["AjProcessingFees"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjProcessingFees"]),
                            ProcessingTime    = (datatable.Rows[j]["AjProcessingTime"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjProcessingTime"]),
                            Margin            = (datatable.Rows[j]["AjMargin"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjMargin"]),
                            Amount            = (datatable.Rows[j]["AjAmount"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjAmount"]),
                            StudyPlaceName    = (datatable.Rows[j]["AjStudyPlaceName"] is DBNull) ? null : Convert.ToString(datatable.Rows[j]["AjStudyPlaceName"])
                        };
                        objLoanList.Add(objLoanListProperty);
                    }
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing BindBankList in Bank.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(objLoanList);
        }
Exemplo n.º 30
0
        public override int InsertCommonQuickQuery(QueryProperty objQuickQuery, out string errMsg, out int UserId)
        {
            errMsg          = "";
            UserId          = 0;
            _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.Com);
                _objDataWrapper.AddParameter("@UserCourseId", objQuickQuery.StudentCourseId);
                _objDataWrapper.AddParameter("@UserQuery", objQuickQuery.StudentQuery);

                var ObjerrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                var ObjUserId =
                    (SqlParameter)(_objDataWrapper.AddParameter("@UserId", SqlDbType.Int, ParameterDirection.Output));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUserQuery");
                if (ObjerrMsg != null && ObjerrMsg.Value != null)
                {
                    errMsg = Convert.ToString(ObjerrMsg.Value);
                }
                if (ObjUserId != null && ObjUserId.Value != null)
                {
                    UserId = Convert.ToInt32(ObjUserId.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertCommonQuickQuery in Query.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }