Beispiel #1
0
        public ActionResult Portalusers()
        {
            if (Session["UserName"] != null)
            {
                MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
                AllClasses     aC = new AllClasses();
                aC.MenuandContent = mC;

                List <PortalUsers> pU = new BusinessLogic().AllPU();
                List <PortalUser>  Pu = new List <PortalUser>();

                if (pU != null)
                {
                    foreach (var dfr in pU)
                    {
                        PortalUser i = new PortalUser();
                        i.Id       = dfr.Id;
                        i.Username = dfr.Username;
                        i.Password = dfr.Password;
                        i.UserType = dfr.UserType;
                        Pu.Add(i);
                    }
                }

                aC.PortalUsers = Pu;

                return(View("PortalUsers", aC));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }
Beispiel #2
0
        public ActionResult Login(AllClasses ac)
        {
            MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());

            ac.MenuandContent = mC;
            if (string.IsNullOrEmpty(ac.User.Username))
            {
                ac.User.ErrorMsg = mC.UserNameEmpty;
                return(View("Index", ac));
            }
            else if (string.IsNullOrEmpty(ac.User.Password))
            {
                ac.User.ErrorMsg = mC.PassWordEmpty;
                return(View("Index", ac));
            }
            else
            {
                string      Encrypt = CryptoUtility.Encrypt(ac.User.Password);
                PortalUsers u       = new BusinessLogic().User(ac.User.Username, Encrypt);
                if (u == null)
                {
                    ac.User.ErrorMsg = mC.UserNamePassWordInCorrect;
                    return(View("Index", ac));
                }
                else
                {
                    Session["UserName"] = u.Username;
                    return(RedirectToAction("Dashboard", "User"));
                }
            }
        }
Beispiel #3
0
        public ActionResult Dashboard()
        {
            if (Session["UserName"] != null)
            {
                MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
                AllClasses     aC = new AllClasses();
                aC.MenuandContent = mC;

                List <Users> uS = new BusinessLogic().AllUsers();
                List <Logs>  lG = new BusinessLogic().AllLogs();
                List <User>  Us = new List <User>();
                List <Log>   Lg = new List <Log>();

                if (uS != null)
                {
                    foreach (var dfdb in uS)
                    {
                        User u = new User();
                        u.Id         = dfdb.Id;
                        u.Username   = dfdb.Username;
                        u.Password   = dfdb.Password;
                        u.Udid       = dfdb.Udid;
                        u.IsUaePass  = dfdb.IsUaePass;
                        u.IsGuest    = dfdb.IsGuest;
                        u.DeviceType = dfdb.DeviceType;
                        u.CreatedOn  = dfdb.CreatedOn;
                        u.IsActive   = dfdb.IsActive;
                        Us.Add(u);
                    }
                    Us.TrimExcess();
                }

                if (lG != null)
                {
                    foreach (var dfdb in lG)
                    {
                        Log u = new Log();
                        u.LogId     = dfdb.LogId;
                        u.Message   = dfdb.Message;
                        u.ErrorCode = dfdb.ErrorCode;
                        u.Location  = dfdb.Location;
                        u.CreatedOn = dfdb.CreatedOn;
                        Lg.Add(u);
                    }
                    Lg.TrimExcess();
                }

                aC.Users = Us;
                aC.Logs  = Lg;

                return(View("Dashboard", aC));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }
Beispiel #4
0
        public ActionResult Reporting()
        {
            if (Session["UserName"] != null)
            {
                ViewBag.Title = "Reporting";

                MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
                AllClasses     aC = new AllClasses();
                aC.MenuandContent = mC;

                List <ServiceReportings>   sR = new BusinessLogic().AllSPs();
                List <ServiceInformations> sI = new BusinessLogic().AllSIs();

                List <ServiceReporting>   Sr = new List <ServiceReporting>();
                List <ServiceInformation> Si = new List <ServiceInformation>();

                if (sR != null)
                {
                    foreach (var dfr in sR)
                    {
                        ServiceReporting i = new ServiceReporting();
                        i.ServiceName  = dfr.ServiceName;
                        i.CreatedOn    = dfr.CreatedOn;
                        i.ErrorCode    = dfr.ErrorCode;
                        i.ErrorDetails = dfr.ErrorDetails;
                        Sr.Add(i);
                    }
                }

                if (sI != null)
                {
                    foreach (var dfr in sI)
                    {
                        ServiceInformation i = new ServiceInformation();
                        i.ServiceName = dfr.ServiceName;
                        i.CreatedOn   = dfr.CreatedOn;
                        i.NoOfErrors  = dfr.NoOfErrors;
                        i.NoOfSuccess = dfr.NoOfSuccess;
                        Si.Add(i);
                    }
                }

                aC.SRs = Sr;
                aC.SIs = Si;

                return(View("Reporting", aC));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }
Beispiel #5
0
        public ActionResult Index()
        {
            MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
            AllClasses     aC = new AllClasses();

            aC.MenuandContent = mC;
            aC.User           = new User();

            if (Session["UserName"] == null)
            {
                return(View("Index", aC));
            }
            else
            {
                return(RedirectToAction("Dashboard", "User"));
            }
        }
Beispiel #6
0
        public ActionResult Cms()
        {
            if (Session["UserName"] != null)
            {
                ViewBag.Title = "Content Managemnent";
                MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
                AllClasses     aC = new AllClasses();
                aC.MenuandContent = mC;
                ContentManagements Cms = new BusinessLogic().Cms();
                ContentManagement  cMs = new ContentManagement();
                cMs.TermsAndConditions = Cms != null ? Cms.TermsAndConditions : "";
                cMs.PrivacyAndPolicy   = Cms != null ? Cms.PrivacyAndPolicy : "";
                aC.ContentManagement   = cMs;

                List <PushNotifications> pN = new BusinessLogic().AllPN();
                List <PushNotification>  Pn = new List <PushNotification>();
                if (pN != null)
                {
                    foreach (var dfr in pN)
                    {
                        PushNotification i = new PushNotification();
                        i.id    = dfr.id;
                        i.Title = dfr.Title;
                        i.Descp = dfr.Descp;
                        Pn.Add(i);
                    }
                }

                aC.PushNotifications = Pn;

                return(View("Cms", aC));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }
Beispiel #7
0
        public ActionResult Feedback()
        {
            if (Session["UserName"] != null)
            {
                ViewBag.Title = "Feedback";

                MenuAndContent mC = new MenuAndContent(System.Web.HttpContext.Current.Session["LanguageVar"].ToString());
                AllClasses     aC = new AllClasses();
                aC.MenuandContent = mC;

                List <Feedbacks> fB = new BusinessLogic().AllFb();

                List <Feedback> Fb = new List <Feedback>();

                if (fB != null)
                {
                    foreach (var dfr in fB)
                    {
                        Feedback i = new Feedback();
                        i.FullName      = dfr.FullName;
                        i.EmailAddress  = dfr.EmailAddress;
                        i.ContactNumber = dfr.ContactNumber;
                        i.FeedbackMsg   = dfr.FeedbackMsg;
                        i.MsgType       = dfr.MsgType;
                        Fb.Add(i);
                    }
                }

                aC.FBs = Fb;

                return(View("Feedback", aC));
            }
            else
            {
                return(RedirectToAction("Index", "User"));
            }
        }