public HttpResponseMessage insertAddres(AddresBO address)
        {
            address.CustomerID = (int)HttpContext.Current.Session["CustomerID"];
            int addrs   = iaddres.AddAddres(address);
            var session = HttpContext.Current.Session;

            if (session != null)
            {
                HttpContext.Current.Session["AddresID"] = addrs;
            }
            return(Request.CreateResponse(HttpStatusCode.OK, "saved successfully"));
        }
Exemple #2
0
 public int AddAddres(AddresBO address)
 {
     try
     {
         Addre addr = new Addre();
         addr.AddressType = address.AddressType;
         addr.Addres      = address.Address;
         addr.City        = address.City;
         addr.States      = address.State;
         addr.Country     = address.Country;
         addr.pincode     = address.pincode;
         addr.CustomerID  = address.CustomerID;
         _db.Addres.Add(addr);
         _db.SaveChanges();
         return(addr.AddresID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
        public ActionResult Datastore()
        {
            AddresBO address = new AddresBO();

            return(View("Address", address));
        }