コード例 #1
0
        public ActionResult Create()
        {
            @TempData["Name"]    = Session["Name"];
            ViewData["PageRole"] = 1;

            int editDocInputs = (Session["Doctor"] != null) ? (Convert.ToInt32(Session["Doctor"])) : 0;

            UpgradeServiceViewModel UpgradeServiceVM = new UpgradeServiceViewModel();

            UpgradeServiceVM.DurationList    = upgradeSerciceRepo.GetDuration().ToList();
            UpgradeServiceVM.MonthsList      = upgradeSerciceRepo.GetMonths().ToList();
            UpgradeServiceVM.GetUpgrdService = upgradeSerciceRepo.GetUpgrdService().ToList();

            UpgradeServiceVM.membershipListTwo = new List <MembershipTwo>()
            {
                new MembershipTwo {
                    MembershipId = 1, MembershipType = "Directory Listing"
                },                                                                    //{ID=1,Name="Group 1" },
                new MembershipTwo {
                    MembershipId = 2, MembershipType = "Online Appointment Scheduling"
                },
                new MembershipTwo {
                    MembershipId = 3, MembershipType = "Medical Answering Service "
                },
            };
            UpgradeServiceVM.SelectedMember = UpgradeServiceVM.membershipListTwo.Select(x => x.MembershipId).ToArray();

            return(View(UpgradeServiceVM));
        }
コード例 #2
0
        public ActionResult Create()
        {
            @TempData["Name"]    = Session["Name"];
            ViewData["PageRole"] = 1;

            int Id = (Convert.ToInt32(Session["EditDoctor"]));

            int editInputs = (Session["EditService"] != null) ? (Convert.ToInt32(Session["EditService"])) : 0;


            UpgradeServiceViewModel UpgradeServiceVM = new UpgradeServiceViewModel();

            UpgradeServiceVM.DurationList    = upgradeSerciceRepo.GetDuration().ToList();
            UpgradeServiceVM.MonthsList      = upgradeSerciceRepo.GetMonths().ToList();
            UpgradeServiceVM.GetUpgrdService = upgradeSerciceRepo.GetUpgrdService().ToList();

            UpgradeServiceVM.MembershipList = upgradeSerciceRepo.GetMembers().Where(x => x.InactiveFlag == "N").ToList();
            UpgradeServiceVM.SelectedMember = UpgradeServiceVM.MembershipList.Select(x => x.MembershipId).ToArray();

            //if (editInputs != 0)
            //{
            //    List<UpgradeService> NewService = upgradeSerciceRepo.GetServices().Where(x => x.LoginId == 4).ToList();

            //    foreach (var item in NewService)
            //    {
            //        int logid = item.LoginId;
            //        int memID = item.MembershipId;

            //        var AllUserInfo = (from u in db.Memberships
            //                           join m in db.upgradeServices on u.MembershipId equals m.MembershipId
            //                           where m.InactiveFlag == "N" && m.LoginId == logid
            //                           select new
            //                           {
            //                               CheckedStatus=m.CheckedStatus,
            //                               MembershipType=u.MembershipType,
            //                               MembershipId=u.MembershipId,
            //                           }).ToList();

            //        var AllUserInfoo = (from u in db.Memberships
            //                           join m in db.upgradeServices on u.MembershipId equals m.MembershipId
            //                            where m.InactiveFlag == "N" && u.MembershipId != memID
            //                           select new
            //                           {
            //                               CheckedStatus = u.CheckedStatus,
            //                               MembershipType = u.MembershipType,
            //                               MembershipId = u.MembershipId,
            //                           }).ToList();

            //        List<MCMDMembership> Membershipget = new List<MCMDMembership>();

            //        foreach (var itemm in AllUserInfo)
            //        {
            //            var s = new MCMDMembership();
            //            s.CheckedStatus = itemm.CheckedStatus;
            //            s.MembershipType = itemm.MembershipType;
            //            s.MembershipId = itemm.MembershipId;
            //            Membershipget.Add(s);

            //        }
            //        foreach (var itemm in AllUserInfoo)
            //        {
            //            var s = new MCMDMembership();
            //            s.CheckedStatus = itemm.CheckedStatus;
            //            s.MembershipType = itemm.MembershipType;
            //            s.MembershipId = itemm.MembershipId;
            //            Membershipget.Add(s);

            //        }
            //        UpgradeServiceVM.MembershipList = Membershipget;
            //        UpgradeServiceVM.UpgradeServiceId = item.UpgradeServiceId;
            //        UpgradeServiceVM.DurationId = item.Durations;
            //        UpgradeServiceVM.AutoRenavalId = item.AutoRenaval;
            //        Session["EditService"] = null;
            //    }


            //}
            //else
            //{

            //    UpgradeServiceVM.MembershipList = upgradeSerciceRepo.GetMembers().Where(x => x.InactiveFlag == "N").ToList();
            //    UpgradeServiceVM.SelectedMember = UpgradeServiceVM.MembershipList.Select(x => x.MembershipId).ToArray();

            //}
            return(View(UpgradeServiceVM));
        }