Beispiel #1
0
        public IActionResult PValues()
        {
            var currentRoleId = _partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = _partActRepo.GetPartAct("PayemntValues.View", currentRoleId);

            if (permission == null)
            {
                _toastNotification.AddErrorToastMessage("ليس لديك الصلاحيات الكافية", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }

            var model = new PaymentValuesRepo(_db, _partnerManager).GetAll();

            return(View(model));
        }
Beispiel #2
0
        public IActionResult Delete(int id)
        {
            var currentRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = partnerActivity.GetPartAct("MessageTemplate.Delete", currentRoleId);

            if (permission == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }

            var old = new MessageTemplateRepo(db, partnerManager).GetSingle(id);

            if (old != null)
            {
                var audit = new DataAudit();
                audit.Activity.Id    = "MessageTemplate.Delete";
                audit.PartnerId      = partnerManager.GetCurrentUserId(this.HttpContext);
                audit.PartnerAccount = partnerManager.GetCurrentUserAccount(this.HttpContext);
                audit.Action.Id      = "Delete";
                audit.Success        = true;
                audit.OldValue       = old.ToString();
                auditing.Create(audit);
                new MessageTemplateRepo(db, partnerManager).RemoveMessage(id);
            }
            return(RedirectToAction("Index"));
        }
        public IActionResult Index()
        {
            var currRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission = partnerActivity.GetPartAct("MoneyTransfer.Adjustment.Query", currRoleId);

            if (permission == null || permission.Details == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحيات الكافية ", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            var model = new AdjustmentQueryDto();

            model.StartDate       = DateTime.Today.AddMonths(-1);
            model.EndDate         = DateTime.Today;
            model.Paging.PageNo   = 1;
            model.Paging.PageSize = 50;
            return(View(model));
        }
Beispiel #4
0
        public IActionResult Index()
        {
            var currentRoleId = partner.GetCurrentUserRole(this.HttpContext);
            var permission    = partnerActivity.GetPartAct("Recharge.Query", currentRoleId);

            if (permission == null)
            {
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            var model = new RechargeQuery();

            model.Statuses        = new CommonCodeRepo(db).GetCodesByType("Collection.Status");
            model.AccessChannel   = new CommonCodeRepo(db).GetCodesByType("access.channel");
            model.QFromDate       = DateTime.Today.AddMonths(-1);
            model.QToDate         = DateTime.Today;
            model.Paging.PageNo   = 1;
            model.Paging.PageSize = 50;
            model.Paging.Count    = 0;
            return(View(model));
        }
        public IActionResult Index()
        {
            var currentRole = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission  = partnerActivity.GetPartAct("Notification.Query", currentRole);

            if (permission == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحيات الكافية", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            else
            {
                var model = new SMSOutBackDto();
                model.StartDate = DateTime.Today.AddMonths(-1);
                model.EndDate   = DateTime.Today;
                return(View(model));
            }
        }
Beispiel #6
0
        public IActionResult Index()
        {
            var currentRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = partnerActivity.GetPartAct("BgService.Query", currentRoleId);

            if (permission == null || permission.Details == null || permission.Details.Count == 0)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحيات الكافية", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            var model    = new AppBackgroundServiceQueryDto();
            var sources  = new CommonCodeRepo(db).GetCodesByType("bg_service_source");
            var statuses = new CommonCodeRepo(db).GetCodesByType("bg_service_status");

            model.Sources   = sources;
            model.Statuses  = statuses;
            model.StartDate = DateTime.Today.AddMonths(-1);
            model.EndDate   = DateTime.Today;
            return(View(model));
        }
        public IActionResult Create()
        {
            var currentRoleId = _partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = _partnerActivity.GetPartAct("MoneyTransfer.Create", currentRoleId);

            if (permission == null)
            {
                _toastNotification.AddErrorToastMessage("ليس لديك الصلاحيات الكافية", new ToastrOptions {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            var model = new CreateMoneyTransferDto();
            var currentPartAccount = _partnerManager.GetCurrentUserAccount(this.HttpContext);
            var currentPart        = _partnerManager.GetPartnerByAccount(currentPartAccount);

            model.CreatorBalance = currentPart.Balance - currentPart.Reserved;
            var payTypes = new CommonCodeRepo(_db).GetCodesByType("pay.type");

            model.PayType = payTypes;
            model.PayDate = DateTime.Today;
            return(View(model));
        }
Beispiel #8
0
        public IActionResult Index(string id)
        {
            var currentRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = _activityRepo.GetPartAct("Activity.Query", currentRoleId);

            if (permission == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions
                {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }

            if (!string.IsNullOrEmpty(id))
            {
                var activity = new ActivityRepo(db, partnerManager).GetActivity(id, true);
                if (activity != null)
                {
                    var model = new ActivityQuery();
                    model.Results.Add(activity);
                    return(View(model));
                }
                else
                {
                    var model = new ActivityQuery();
                    return(View(model));
                }
            }
            else
            {
                var activities = new ActivityRepo(db, partnerManager).GetActivities(id, true);
                var model      = new ActivityQuery();
                model.Results = activities;
                return(View(model));
            }
        }
        public IActionResult Index()
        {
            var currentRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = partnerActivity.GetPartAct("UserNotify.Query", currentRoleId);

            if (permission == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions
                {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }
            var model = new UserNotifyQueryDto();

            model.Statuses        = new CommonCodeRepo(db).GetCodesByType("UserInstructStatus");
            model.StartDate       = DateTime.Today.AddMonths(-1);
            model.EndDate         = DateTime.Today.AddDays(1);
            model.Paging.PageNo   = 1;
            model.Paging.PageSize = 50;
            model.Paging.Count    = 0;
            return(View(model));
        }
Beispiel #10
0
        public IActionResult Collection()
        {
            var currentRoleId = partnerManager.GetCurrentUserRole(this.HttpContext);
            var permission    = partnerActivity.GetPartAct("Report.Collection.StatReport", currentRoleId);

            if (permission == null)
            {
                toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions
                {
                    Title = ""
                });
                return(Redirect(Request.Headers["Referer"].ToString()));
            }

            var channels = new CommonCodeRepo(db).GetCodesByType("access.channel");
            var statuses = new CommonCodeRepo(db).GetCodesByType("Collection.Status");
            var model    = new CollectionRptQuery();

            model.Channels        = channels;
            model.Statuses        = statuses;
            model.Param.StartDate = DateTime.Today.Subtract(TimeSpan.FromDays(10));
            model.Param.EndDate   = DateTime.Today.AddDays(1);
            return(View(model));
        }