public ActionResult New()
        {
            pb_Location model = new pb_Location();

            model.UserId = ps_Membership.GetUser().UserId;

            return(View(model));
        }
        public ActionResult Edit(pb_Location model)
        {
            if (ModelState.IsValid && model.Address != null)
            {
                bn_Location bnLocation = new bn_Location();
                var         re         = bnLocation.Update(
                    model.LocationId,
                    model.Latitude,
                    model.Longitude,
                    model.Address);

                if (re >= 0)
                {
                    return(RedirectToAction("Index", "User"));
                }

                //return fail.
            }
            return(View(model));
        }
        public ActionResult New(pb_Location model)
        {
            if (ModelState.IsValid && model.Address != null)
            {
                bn_Location bnLocation = new bn_Location();
                var         re         = bnLocation.Create(
                    model.UserId,
                    model.Latitude,
                    model.Longitude,
                    model.Address);

                if (re != Guid.Empty)
                {
                    return(RedirectToAction("Index", "User"));
                }

                //return fail.
            }
            return(View(model));
        }