예제 #1
0
        public decimal InsertStudentMonthlyAdvanceFeeByStudentId(decimal StudentId, int Feemonth, int AdmissionFee, int ReAdmissionFee,
                                                                 int RegistrationFee, int ComputerFee, int Fine, int ExamFee, int GenatorFee, string FeeDate, int SchoolAccountId)
        {
            try
            {
                SqlParameter[] paramStudentFee = new SqlParameter[11];
                paramStudentFee[0] = new SqlParameter("@StudentId", Convert.ToDecimal(StudentId));
                paramStudentFee[1] = new SqlParameter("@FeeMonth", Feemonth);
                paramStudentFee[2] = new SqlParameter("@AdmissionFee", AdmissionFee);

                paramStudentFee[3]  = new SqlParameter("@ReAdmissionFee", ReAdmissionFee);
                paramStudentFee[4]  = new SqlParameter("@RegistrationFee", RegistrationFee);
                paramStudentFee[5]  = new SqlParameter("@ComputerFee", ComputerFee);
                paramStudentFee[6]  = new SqlParameter("@Fine", Fine);
                paramStudentFee[7]  = new SqlParameter("@ExamFee", ExamFee);
                paramStudentFee[8]  = new SqlParameter("@GeneratorFee", GenatorFee);
                paramStudentFee[9]  = new SqlParameter("@FeeDate", Convert.ToString(FeeDate));
                paramStudentFee[10] = new SqlParameter("@SchoolAccountId", SchoolAccountId);
                return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertStudentMonthlyFeeByStudentId]", paramStudentFee));
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #2
0
        public decimal RegisterNewMerchantUser(ModelMerchantUser objModelMerchantUser)
        {
            decimal result            = 0;
            string  getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[8];

            param[0] = new SqlParameter("@MerchantNameEN", objModelMerchantUser.MerchantNameEN);
            param[1] = new SqlParameter("@MerchantEmail", objModelMerchantUser.MerchantEmail);
            param[2] = new SqlParameter("@MerchantPassword", EncryptDecrypt.Encrypt(objModelMerchantUser.MerchantPassword));
            param[3] = new SqlParameter("@strAdminUserMobile", objModelMerchantUser.MerchantMobileNumber);
            param[4] = new SqlParameter("@CompanyNameEN", objModelMerchantUser.CompanyNameEN);
            param[5] = new SqlParameter("@sCompanyLogo", objModelMerchantUser.CompanyLogo);
            param[6] = new SqlParameter("@AccountStatus", 1);
            param[7] = new SqlParameter("@ActivationCodeByEmail", getActivationCode);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertMerchantUser]", param);
            if (result > 0)
            {
                string MerchantKey         = EncryptDecrypt.Encrypt(DALUtility.GetEmailActivationCode());
                string MerchantReferenceID = EncryptDecrypt.GenerateHashCode(result + MerchantKey + System.DateTime.Now);
                if (UpdateMercharAPIKeys(result, MerchantKey, MerchantReferenceID) > 0)
                {
                    SendActivationCode(getActivationCode, objModelMerchantUser.MerchantEmail);
                }
            }
            return(result);
        }
예제 #3
0
        //UpdateMerchantServiceStatus

        public decimal UpdateMerchantServiceStatus(decimal MerchantAccountNo, int ServiceId)
        {
            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantAccountNo", MerchantAccountNo);
            param[1] = new SqlParameter("@PaymentServiceTypeID", ServiceId);

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantServiceStatus]", param));
        }
예제 #4
0
        //MerchantAccountActivate

        public decimal MerchantAccountActivate(string activationCode)
        {
            string getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@ActivationCodeByEmail", activationCode);

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantUserActivate]", param));
        }
예제 #5
0
        public decimal UpdateMerchantUserPassword(string MerchantEmail, string NewPassword)
        {
            string getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantEmail", MerchantEmail);
            param[1] = new SqlParameter("@MerchantPassword", EncryptDecrypt.Encrypt(NewPassword));

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantNewPassword]", param));
        }
예제 #6
0
        private decimal UpdateMercharAPIKeys(decimal MerchantAccountNo, string MerchantKey, string MerchantReferenceId)
        {
            decimal result = 0;

            SqlParameter[] param = new SqlParameter[3];

            param[0] = new SqlParameter("@MerchantAccountNo", MerchantAccountNo);
            param[1] = new SqlParameter("@MerchantKey", MerchantKey);
            param[2] = new SqlParameter("@MerchantReferenceID", MerchantReferenceId);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantAPIKeys]", param);
            return(result);
        }
예제 #7
0
        public decimal InsertAdminPage(ModelAdminPage objModelAdminPage)
        {
            SqlParameter[] param = new SqlParameter[5];

            param[0] = new SqlParameter("@AdminPageNameEn", objModelAdminPage.AdminPageNameEn);
            param[1] = new SqlParameter("@AdminPageNameAr", objModelAdminPage.AdminPageNameAr);
            param[2] = new SqlParameter("@AdminPageURL", objModelAdminPage.AdminPageURL);
            param[3] = new SqlParameter("@IsActive", objModelAdminPage.IsActive);
            // param[4] = new SqlParameter("@FeedTitlePath", objModelAdminPage.IsShowInMenu);
            param[4] = new SqlParameter("@AdminPageAddedBy", objModelAdminPage.AdminPageAddedBy);

            return(DALCommon.ExecuteNonQueryReturnIdentity("sp_Admin_InsertAdminPages", param));
        }
예제 #8
0
        public decimal SendPasswordRecoveryKey(string MerchantEmailID)
        {
            decimal result            = 0;
            string  getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantEmail", MerchantEmailID);
            param[1] = new SqlParameter("@PasswordRecoveryKey", getActivationCode);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantFogotPasswordKey]", param);
            if (result > 0)
            {
                SendPasswordRecoveryKey(getActivationCode, MerchantEmailID);
            }
            return(result);
        }
예제 #9
0
        public decimal AddStudentInfo(ViewModelStudent aStudent)
        {
            aStudent.AddedBy = Convert.ToInt32(HttpContext.Current.Session[DALVariables.SchoolAccountId]);

            SqlParameter[] param = new SqlParameter[23];
            SqlCommand     cmd   = new SqlCommand();

            // cmd.CommandType = CommandType.StoredProcedure;

            param[0] = new SqlParameter("@StudentName", aStudent.StudentName);
            param[1] = new SqlParameter("@FatherName", aStudent.FatherName);
            param[2] = new SqlParameter("@ClassId", aStudent.ClassId);

            param[3] = new SqlParameter("@SectionId", aStudent.SectionId);
            param[4] = new SqlParameter("@MonthlyFee", aStudent.MonthlyFee);

            param[5]  = new SqlParameter("@Profession", aStudent.Profession);
            param[6]  = new SqlParameter("@P", aStudent.P);
            param[7]  = new SqlParameter("@Reference", aStudent.Reference);
            param[8]  = new SqlParameter("@Gender", aStudent.Sex);
            param[9]  = new SqlParameter("@DateOfAdmission", aStudent.DateOfAdmission);
            param[10] = new SqlParameter("@DateOfBirth", aStudent.DateOfBirth);
            param[11] = new SqlParameter("@Address", aStudent.Address);
            param[12] = new SqlParameter("@HomeNumber", aStudent.HomeNumber);
            param[13] = new SqlParameter("@OfficeNumber", aStudent.OfficeNumber);
            param[14] = new SqlParameter("@MoblieNumber", aStudent.MoblieNumber);
            param[15] = new SqlParameter("@FatherCnic", aStudent.FatherCNIC);
            param[16] = new SqlParameter("@Email", aStudent.Email);
            //param[17] = new SqlParameter("@AdmissionClass", aStudent.AdmissionClass);
            param[17] = new SqlParameter("@MobileNo", aStudent.OtherMobNo);
            param[18] = new SqlParameter("@CampusID", aStudent.CampusId);
            param[19] = new SqlParameter("@Religon", aStudent.Religon);
            param[20] = new SqlParameter("@StudentImage", aStudent.Simage);
            param[21] = new SqlParameter("@AddedBy", aStudent.AddedBy);
            param[22] = new SqlParameter("@Status", aStudent.Status);


            return(DALCommon.ExecuteNonQueryReturnIdentity("[InsertUpdateStudentInfo]", param));
        }
예제 #10
0
        public decimal InsertFeedData(ModelFeed objModelFeed)
        {
            SqlParameter[] param = new SqlParameter[15];

            param[0]  = new SqlParameter("@FeedChannelName", objModelFeed.FeedChannelName);
            param[1]  = new SqlParameter("@FeedCategory", objModelFeed.FeedCategory);
            param[2]  = new SqlParameter("@FeedURL", objModelFeed.FeedURL);
            param[3]  = new SqlParameter("@FeedTitlePath", objModelFeed.FeedTitlePath);
            param[4]  = new SqlParameter("@FeedCoverImagePath", objModelFeed.FeedCoverImagePath);
            param[5]  = new SqlParameter("@FeedShortDescPath", objModelFeed.FeedShortDescPath);
            param[6]  = new SqlParameter("@FeedDetailPageURLPath", objModelFeed.FeedDetailPageURLPath);
            param[7]  = new SqlParameter("@FeedPubDatePath", objModelFeed.FeedPubDatePath);
            param[8]  = new SqlParameter("@FeedImagePath", objModelFeed.FeedImagePath);
            param[9]  = new SqlParameter("@FeedDetailPageImagePath", objModelFeed.FeedDetailPageImagePath);
            param[10] = new SqlParameter("@FeedPostDetailsPath", objModelFeed.FeedPostDetailsPath);
            param[11] = new SqlParameter("@FeedCategoryPath", objModelFeed.FeedCategoryPath);
            param[12] = new SqlParameter("@FeedSubCategoryPath", objModelFeed.FeedSubCategoryPath);
            param[13] = new SqlParameter("@FeedAddedBy", Convert.ToDecimal("1"));
            //param[14] = new SqlParameter("@FeedStatus", objModelFeed.FeedStatus);
            param[14] = new SqlParameter("@FeedStatus", 1);

            return(DALCommon.ExecuteNonQueryReturnIdentity("sp_Merchant_InsertFeedData", param));
        }
예제 #11
0
        public decimal InsertTwitterScrappedData(ModelTwitterFeeds objModelTwitterFeeds)
        {
            decimal TwitterPageId       = 0;
            decimal twitterFeedDetailId = 0;

            try
            {
                SqlParameter[] paramTwitterFeeds = new SqlParameter[9];
                paramTwitterFeeds[0] = new SqlParameter("@FeedId", objModelTwitterFeeds.FeedId);
                paramTwitterFeeds[1] = new SqlParameter("@UserPageId", objModelTwitterFeeds.UserPageId);
                paramTwitterFeeds[2] = new SqlParameter("@UserPageTitle", objModelTwitterFeeds.UserPageTitle);
                paramTwitterFeeds[3] = new SqlParameter("@UserScreenName", objModelTwitterFeeds.UserScreenName);
                paramTwitterFeeds[4] = new SqlParameter("@UserPageDesc", objModelTwitterFeeds.UserPageDesc);
                paramTwitterFeeds[5] = new SqlParameter("@UserPageLanguage", objModelTwitterFeeds.UserPageLanguage);
                paramTwitterFeeds[6] = new SqlParameter("@UserPageFollowers", objModelTwitterFeeds.UserPageFollowers);
                paramTwitterFeeds[7] = new SqlParameter("@UserPageCoverImageURL", objModelTwitterFeeds.UserPageCoverImageURL);
                paramTwitterFeeds[8] = new SqlParameter("@UserPageLogoImage", objModelTwitterFeeds.UserPageLogoImage);

                TwitterPageId = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedsData]", paramTwitterFeeds);

                if (TwitterPageId > 0)
                {
                    if (objModelTwitterFeeds.TwitterFeedDetails.Count > 0)
                    {
                        foreach (ModelTwitterFeedsDetails Tweet in objModelTwitterFeeds.TwitterFeedDetails)
                        {
                            SqlParameter[] paramFeedsDetails = new SqlParameter[7];
                            paramFeedsDetails[0] = new SqlParameter("@TwitterPageId", TwitterPageId);
                            paramFeedsDetails[1] = new SqlParameter("@TweetPostedId", Tweet.FeedPostedtId);
                            paramFeedsDetails[2] = new SqlParameter("@TweetPostedDate", Tweet.FeedPostDate);
                            paramFeedsDetails[3] = new SqlParameter("@TweetFeedDetailPageURL", Tweet.FeedDetailPageURL);
                            paramFeedsDetails[4] = new SqlParameter("@TweetShortText", Tweet.FeedText);
                            paramFeedsDetails[5] = new SqlParameter("@TweetDetailText", Tweet.FeedTextDetail);

                            if (Tweet.FeedMultimediaList != null && Tweet.FeedMultimediaList.Count > 0)
                            {
                                paramFeedsDetails[6] = new SqlParameter("@IsMultiMedia", true);
                            }
                            else
                            {
                                paramFeedsDetails[6] = new SqlParameter("@IsMultiMedia", false);
                            }

                            twitterFeedDetailId = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedDataDetails]", paramFeedsDetails);

                            if (Tweet.FeedMultimediaList.Count > 0 && twitterFeedDetailId > 0)
                            {
                                foreach (ModelFeedMultimedia multimediaFile in Tweet.FeedMultimediaList)
                                {
                                    SqlParameter[] parammultimediaFile = new SqlParameter[4];
                                    parammultimediaFile[0] = new SqlParameter("@TwitterFeedDetailId", twitterFeedDetailId);
                                    parammultimediaFile[1] = new SqlParameter("@MultiMediaType", multimediaFile.MultiMediaType);
                                    parammultimediaFile[2] = new SqlParameter("@MultiMediaURL", multimediaFile.MultiMediaURL);
                                    parammultimediaFile[3] = new SqlParameter("@MultiMediaExtension", multimediaFile.MultiMediaExtension);

                                    DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedMultiMedia]", parammultimediaFile);
                                }
                            }
                        }
                    }
                }
                return(twitterFeedDetailId);
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "BLLFeed, InsertTwitterScrappedData");
            }
            return(twitterFeedDetailId);
        }