Example #1
0
        public ActionResult ccResponse(string encResp)
        {
            string           _TrasactionID       = string.Empty;
            ccavenueresponse objccavenueresponse = new ccavenueresponse();

            try
            {
                Mugurtham.Core.Login.LoggedInUser objLoggedIn = (Mugurtham.Core.Login.LoggedInUser)Session["LoggedInUser"];
                Core.Payment.PaymentGatewayTransactions.PaymentGatewayTransactionsCore objPaymentGatewayTransactionsCore =
                    new Core.Payment.PaymentGatewayTransactions.PaymentGatewayTransactionsCore(objLoggedIn);
                using (objPaymentGatewayTransactionsCore as IDisposable)
                {
                    objPaymentGatewayTransactionsCore.Add(encResp, out _TrasactionID);
                }
                objPaymentGatewayTransactionsCore = null;
                objccavenueresponse.TransactioID  = _TrasactionID;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            finally
            {
                if (objccavenueresponse != null)
                {
                    //  ((IDisposable)objccavenueresponse).Dispose();
                }
            }
            return(View(objccavenueresponse));
        }
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            bool authorize = false;

            //Mugurtham.Core.Login.LoggedInUser objLoggedIn = new LoggedInUser(HttpContext.Current.User.Identity.Name);
            Mugurtham.Core.Login.LoggedInUser objLoggedIn = (Mugurtham.Core.Login.LoggedInUser)HttpContext.Current.Session["LoggedInUser"];
            using (objLoggedIn as IDisposable)
            {
                foreach (var strRoleID in arrAuthourizedRoles)
                {
                    if (strRoleID.ToString() == objLoggedIn.roleID)
                    {
                        authorize = true;
                    }
                    //if (strRoleID.ToString().ToLower() == strLoggedInUsersRoleID.ToLower())
                    //{
                    //    authorize = true;
                    //}
                    //var user = context.AppUser.Where(m => m.UserID == GetUser.CurrentUser/* getting user form current context */ && m.strRoleID == strRoleID &&
                    //m.IsActive == true); // checking active users with allowed strArrRoles.
                    //if (user.Count() > 0)
                    //{
                    //    authorize = true; /* return true if Entity has current user(active) with specific strRoleID */
                    //}
                }
                objLoggedIn.Dispose();
            }
            objLoggedIn = null;

            return(authorize);
        }
Example #3
0
        public ActionResult getSangamDashBoardChart()
        {
            Mugurtham.Core.Login.LoggedInUser objLoggedIn = (Mugurtham.Core.Login.LoggedInUser)Session["LoggedInUser"];
            List <Mugurtham.Core.Dashboard.Sangam.SangamDashboardCoreEntity> objListSangamDashboardCoreEntity = new List <Core.Dashboard.Sangam.SangamDashboardCoreEntity>();
            SangamDashboardCore objSangamDashboardCore = new SangamDashboardCore(ref objLoggedIn);

            using (objSangamDashboardCore as IDisposable)
                objListSangamDashboardCoreEntity = objSangamDashboardCore.GetAll(objLoggedIn.sangamID);
            objSangamDashboardCore = null;
            return(this.Json(objListSangamDashboardCoreEntity, JsonRequestBehavior.AllowGet));
        }