public ActionResult Edit(CustomerModel model)
        {
            if (Session["CustomerId"] == null)
            {
                return(RedirectToAction("Login", "Home"));
            }

            Customer customer = ManageCustomerService.GetCustomerById(model.CustomerId);

            customer.FirstName            = model.FirstName;
            customer.LastName             = model.LastName;
            customer.Email                = model.Email;
            customer.Contactno            = model.Contactno;
            customer.Username             = model.Username;
            customer.Password             = model.Password;
            customer.CompanyName          = model.CompanyName;
            customer.Date_of_Registration = model.Date_of_Registration;

            customer.CustomerId = model.CustomerId;
            customer.IsActive   = model.AccountStatus;
            //customer.createddate = DateTime.Now;
            //customer.updateddate = DateTime.Now;
            ManageCustomerService.UpdateCustomer(customer);

            ViewBag.StatusMessage = "SuccessUpdate";
            return(View(model));
        }
        public ActionResult ChangePassword(int CustomerId, string Password)
        {
            var rsult = "";

            try
            {
                Customer customer = ManageCustomerService.GetCustomerById(CustomerId);

                customer.Password = Password;
                ManageCustomerService.UpdateCustomer(customer);
                rsult = "Password Saved Successfully";
            }
            catch
            {
                rsult = "Try again";
            }


            return(Json(rsult));
        }