Ejemplo n.º 1
0
        // GET: Members
        public ActionResult Index()
        {
            MembersBLL obj = new MembersBLL();

            U_ADMIN_Members[] membs = obj.GetAllMembersDetails();
            return(View(membs));
        }
Ejemplo n.º 2
0
        public ActionResult Unblock(string id)
        {
            MembersBLL obj    = new MembersBLL();
            bool       status = obj.UnBlockThisMember(id);

            return(RedirectToAction("Index", "Members"));
        }
Ejemplo n.º 3
0
        public ActionResult CreateSubAdmin(A_ModelGroupsList subAdmin, HttpPostedFileBase imgFile)
        {
            MembersBLL         obj       = new MembersBLL();
            HttpPostedFileBase files     = null;
            string             Images    = string.Empty;
            string             path      = string.Empty;
            string             directory = string.Empty;

            if (!string.IsNullOrEmpty(Convert.ToString(imgFile)))
            {
                if (Request.Files.Count > 0)
                {
                    int i = 0;
                    files = Request.Files[i];
                    if (files.ContentLength > 0)
                    {
                        string filestoragename = Guid.NewGuid().ToString() + ".jpeg";
                        directory = Server.MapPath("~/images/");
                        path      = Path.Combine(directory, filestoragename);
                        files.SaveAs(path);
                        Images = filestoragename;
                    }
                }
                subAdmin.MasterData.Media_Id_Img = string.IsNullOrEmpty(Images) ? "http://bagadmin.prayogis.com/Img/default_ProfilePicture.jpg" : "http://bagadmin.prayogis.com/Images/" + Images;
            }
            subAdmin.MasterData.Created_by = Convert.ToString(Session["AdminId"]);
            subAdmin.MasterData.Updated_by = Convert.ToString(Session["AdminId"]);
            bool state = obj.NewSubAdmin(subAdmin);

            return(RedirectToAction("Index", "SubAdmin"));
        }
Ejemplo n.º 4
0
        public ActionResult UpdateSubAdmin(SubAdmin usr, HttpPostedFileBase newImg)
        {
            MembersBLL memBLL = new MembersBLL();
            string     Images = "";

            if (!string.IsNullOrEmpty(Convert.ToString(newImg)))
            {
                if (Request.Files.Count > 0)
                {
                    int i = 0;
                    HttpPostedFileBase files = Request.Files[i];
                    if (files.ContentLength > 0)
                    {
                        string filestoragename = Guid.NewGuid().ToString() + ".jpeg";
                        string directory       = Server.MapPath("~/images/");
                        string path            = Path.Combine(directory, filestoragename);
                        files.SaveAs(path);
                        Images = filestoragename;
                    }
                }
                usr.Media_File_Location = string.IsNullOrEmpty(Images) ? "/img/default_ProfilePicture.jpg" : "/images/" + Images;
            }

            usr.Updated_by = Convert.ToString(Session["AdminId"]);
            usr.Created_by = Convert.ToString(Session["AdminId"]);
            bool status = memBLL.UpdateSubAdmin(usr);

            return(RedirectToAction("Index", "SubAdmin"));
        }
Ejemplo n.º 5
0
        public ActionResult SubAdminProfile(string id)
        {
            MembersBLL memBLL = new MembersBLL();
            SubAdmin   data   = memBLL.GetSingleSubAdminDetails(id);

            return(View(data));
        }
Ejemplo n.º 6
0
        // GET: SubAdmin
        public ActionResult Index()
        {
            MembersBLL obj = new MembersBLL();

            U_ADMIN_Members[] Subadmin = obj.GetAllSubAdminDetails();
            return(View(Subadmin));
        }
Ejemplo n.º 7
0
        public ActionResult DashBoard()
        {
            DashboardGroup  details   = new DashboardGroup();
            DashboardTotals tempTotal = new DashboardTotals();
            MembersBLL      memBLL    = new MembersBLL();
            EventsBLL       eveBLL    = new EventsBLL();
            ItemsBLL        iteBLL    = new ItemsBLL();

            List <DashboardEvents>  eves  = new List <DashboardEvents>();
            List <DashboardVendors> vends = new List <DashboardVendors>();

            tempTotal.TotalMembers = memBLL.MembersCount();
            tempTotal.TotalEvents  = eveBLL.EventsCount();
            tempTotal.TotalItems   = iteBLL.ItemsCount();
            tempTotal.TotalVendors = "0000";

            vends.Add(new DashboardVendors("1", "Shop1", "Vendor1", DateTime.Now));
            vends.Add(new DashboardVendors("2", "Shop2", "Vendor2", DateTime.Now));
            vends.Add(new DashboardVendors("3", "Shop3", "Vendor3", DateTime.Now));
            vends.Add(new DashboardVendors("4", "Shop4", "Vendor4", DateTime.Now));
            vends.Add(new DashboardVendors("5", "Shop1", "Vendor5", DateTime.Now));

            details.Totals  = tempTotal;
            details.Members = memBLL.Recent5Members();
            details.Events  = eveBLL.Recent5Events();
            details.Items   = iteBLL.Recent5Items();
            details.Vendors = vends.ToArray();
            return(View(details));
        }
Ejemplo n.º 8
0
        public ActionResult EditMember(string id)
        {
            MembersBLL  obj = new MembersBLL();
            GroupsGroup cmd = new GroupsGroup();

            cmd.personalInfo = obj.GetSingleMemberDetails(id);
            return(View(cmd));
        }
Ejemplo n.º 9
0
        public ActionResult UpdateMember(GroupsGroup memb)
        {
            MembersBLL MembBLL = new MembersBLL();

            memb.personalInfo.Updated_By = Convert.ToString(Session["AdminId"]);
            bool status = MembBLL.UpdateMemberDetails(memb.personalInfo);

            return(RedirectToAction("Index", "Members"));
        }
Ejemplo n.º 10
0
        public ActionResult MemberDetails(string id)
        {
            MembersBLL  obj  = new MembersBLL();
            GroupsBLL   obj1 = new GroupsBLL();
            GroupsGroup cmd  = new GroupsGroup();

            cmd.personalInfo = obj.GetSingleMemberDetails(id);
            cmd.HisGroups    = obj1.getHisGroupsDetails(id);
            cmd.JoinedGroups = obj1.getJoinedGroupsDetails(id);
            cmd.HisContacts  = obj.GetMemberContactsDetails(id);
            return(View(cmd));
        }