public int disableAccount(DisableAccountModel activeAccountModel) { try { if (ModelState.IsValid) { //if (Membership.ValidateUser(User.Identity.Name, activeAccountModel.Password)) //{ // if (activeAccountModel.CustomerID > 0) // { Customer customer = customerService.GetByPrimaryKey(activeAccountModel.CustomerID); customer.CustomerState = Common.InActive; if (customerService.Update(customer)) { string customerName = customer.CustomerFirstName + " " + customer.CustomerLastName; LogService.WriteLog2DB(accountService.GetUserId(User.Identity.GetUserName()), (int)Common.ActionID.Update, customer.CustomerID, SDateTime.GetYYYYMMddHmmSSNow(), General.GetIPAddress(), TableNameID, customerName); return(1); } // } //} } } catch (Exception ex) { LogService.WriteException(ex); } return(0); }
public ActionResult disableAccount(int id) { DisableAccountModel disableAccountModel = new DisableAccountModel(); disableAccountModel.CustomerID = id; return(PartialView(disableAccountModel)); }