public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (managerCustomer_ != null)
            {
                hash ^= ManagerCustomer.GetHashCode();
            }
            if (managerLinkId_ != null)
            {
                hash ^= ManagerLinkId.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (managerCustomer_ != null)
            {
                hash ^= ManagerCustomer.GetHashCode();
            }
            if (managerLinkId_ != null)
            {
                hash ^= ManagerLinkId.GetHashCode();
            }
            if (Status != global::Google.Ads.GoogleAds.V4.Enums.ManagerLinkStatusEnum.Types.ManagerLinkStatus.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public ActionResult DeleteCustomer(string id)
 {
     if (string.IsNullOrEmpty(id))
     {
         return(RedirectToAction("Index", "Customer", null));
     }
     ManagerCustomer.DelCustomer(id);
     return(RedirectToAction("Index", "Customer", null));
 }
        public ActionResult DetailsNull()
        {
            string         Name     = HttpContext.User.Identity.Name;
            CustomerEntity detail   = ManagerCustomer.DetailCustomer(Name);
            string         filePath = "~/Uploads//customer//";

            detail.customer_photo = Path.Combine(filePath + detail.customer_photo);

            return(View(detail));
        }
        public ActionResult Edit(string id)
        {
            ViewBag.trainerList = ManagerTrainer.GetTrainers().ToList();
            ViewBag.planList    = ManagerPlan.Getplans().ToList();

            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index", "Customer", null));
            }
            return(View(ManagerCustomer.DetailCustomer(id)));
        }
        public ActionResult Details(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index", "Customer", null));
            }
            CustomerEntity detail   = ManagerCustomer.DetailCustomer(id);
            string         filePath = "~/Uploads//customer//";

            detail.customer_photo = Path.Combine(filePath + detail.customer_photo);

            return(View(detail));
        }
        public ActionResult SaveCustomer(CustomerEntity entity)
        {
            string fileName    = Path.GetFileNameWithoutExtension(entity.PhotoFile.FileName);
            string extension   = Path.GetExtension(entity.PhotoFile.FileName);
            string newFilename = Guid.NewGuid().ToString();

            newFilename = newFilename + extension;
            string filePath = "~/Uploads//customer//";

            entity.customer_photo = newFilename;
            filePath = Server.MapPath(filePath + newFilename);
            entity.PhotoFile.SaveAs(filePath);
            ManagerCustomer.SaveCustomer(entity);
            return(RedirectToAction("Index", "Customer", null));
        }
 public ActionResult Edit(CustomerEntity detail)
 {
     ManagerCustomer.EditCustomer(detail);
     return(RedirectToAction("Index", "Customer", null));
 }
        // GET: Customer

        public ActionResult Index()
        {
            return(View(ManagerCustomer.GetCustomers()));
        }