示例#1
0
 public ActionResult Edit(CustomerModel Customer)
 {
     if (ModelState.IsValid)
     {
         BCBSClient client = new BCBSClient();
         long Id = 0;
         Id = client.UpdatecustomerById(Customer.Id, 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 Updated successfully..!";
         }
         else
         {
             TempData["Error"] = "Customer Update failed..!";
         }
         ModelState.Clear();
         return RedirectToAction("Index", "Customer");
     }
     else
     {
         return View(Customer);
     }
 }