Esempio n. 1
0
 public ActionResult New(CustomerModel customer)
 {
     if (ModelState.IsValid)
     {
         BCBSClient client = new BCBSClient();
         long Id = 0;
         Id = client.Insertcustomer(customer.Name, customer.ChargeCode, customer.CustomerType, customer.CustomerAddress, customer.City,
             customer.PostalCode, customer.State, customer.Country, customer.FirstName, customer.LastName,
             customer.Phone, customer.Fax, customer.Occupation, customer.Email, customer.Status);
         if (Id > 0)
         {
             TempData["Message"] = "Customer Added successfully..!";
         }
         else
         {
             TempData["Error"] = "Customer Adding failed..!";
         }
         ModelState.Clear();
         return RedirectToAction("Index", "Customer");
     }
     else
     {
         return View(customer);
     }
 }