예제 #1
0
        public ActionResult ContactInfo()
        {
            if (Session["ID"] == null)
            {
                return(RedirectToAction("Index"));
            }

            CONTACTINFO contactInfo = contactInfoDA.Get();

            if (contactInfo.ID <= 0)
            {
                contactInfo.PHONE     = "";
                contactInfo.EMAIL     = "";
                contactInfo.ADDRESS   = "";
                contactInfo.FACEBOOK  = "";
                contactInfo.TWITTER   = "";
                contactInfo.INSTAGRAM = "";
                contactInfoDA.Insert(contactInfo);

                contactInfo = contactInfoDA.Get();
            }
            return(View(contactInfo));
        }
예제 #2
0
        public ActionResult _ContactInfo()
        {
            CONTACTINFO contactInfo = contactInfoDA.Get();

            return(PartialView(contactInfo));
        }