コード例 #1
0
        public ActionResult collageDetails(CollageModel collage)
        {
            CollageBusinessModel collageDetails = new CollageBusinessModel
            {
                CollageName = collage.CollageName
            };

            adminBusinessOperations.SetCollageName(collageDetails);

            return(RedirectToAction("collageDetails"));
        }
コード例 #2
0
        //public void SetRoles()
        //{
        //    try
        //    {
        //        Role role = new Role
        //        {
        //            RoleID = 1,
        //            RoleName = "Admin",
        //            CreateDate = DateTime.Now,
        //            MdifiedDate = DateTime.Now
        //        };
        //        db.Roles.Add(role);
        //        db.SaveChanges();
        //    }
        //    catch (Exception ex)
        //    {
        //        ExceptionTracker.SendErrorToText(ex);
        //    }

        //}

        public void SetCollageName(CollageBusinessModel collage)
        {
            Collage collageDetail = new Collage
            {
                CollageName = collage.CollageName,
                CreateDate  = DateTime.Now,
                MdifiedDate = DateTime.Now
            };

            adminDataBaseOperation.SetCollageetails(collageDetail);
        }
コード例 #3
0
        public List <CollageBusinessModel> GetAllCollage()
        {
            List <Collage> listofCollage            = new List <Collage>();
            List <CollageBusinessModel> allCollages = new List <CollageBusinessModel>();

            try
            {
                listofCollage = applicationLevelDataBaseOps.GetAllCollage().ToList();
                foreach (Collage item in listofCollage)
                {
                    CollageBusinessModel collageItem = new CollageBusinessModel {
                        CollageID   = item.CollageID,
                        CollageName = item.CollageName
                    };
                    allCollages.Add(collageItem);
                }
            }
            catch (Exception ex)
            {
                ExceptionTracker.SendErrorToText(ex);
            }
            return(allCollages);
        }