public ActionResult Index()
        {
            var CustomerId  = Convert.ToInt32(Session["CustomerId"]) == null ? 0 : Convert.ToInt32(Session["CustomerId"]);
            var model       = new List <AdminStaffModel>();
            var AdminStaffs = _AdminStaffService.GetAdminStaffs().Where(c => c.CustomerId == CustomerId);

            // Mapper.CreateMap<CommunicationApp.Entity.Property, CommunicationApp.Web.Models.PropertyModel>();
            foreach (var AdminStaff in AdminStaffs)
            {
                // CommunicationApp.Models.AdminStaffModel AdminStaffModel = Mapper.Map<CommunicationApp.Entity.AdminStaff, CommunicationApp.Models.AdminStaffModel>(AdminStaff);
                AdminStaffModel AdminStaffModel = new CommunicationApp.Models.AdminStaffModel();
                AdminStaffModel.Address      = AdminStaff.Address;
                AdminStaffModel.FirstName    = AdminStaff.FirstName;
                AdminStaffModel.LastName     = AdminStaff.LastName;
                AdminStaffModel.MobileNo     = AdminStaff.MobileNo;
                AdminStaffModel.PhotoPath    = AdminStaff.PhotoPath;
                AdminStaffModel.Designation  = AdminStaff.Designation;
                AdminStaffModel.Latitude     = AdminStaff.Latitude;
                AdminStaffModel.Longitude    = AdminStaff.Longitude;
                AdminStaffModel.WebsiteUrl   = AdminStaff.WebsiteUrl;
                AdminStaffModel.EmailId      = AdminStaff.EmailId;
                AdminStaffModel.IsActive     = AdminStaff.IsActive;
                AdminStaffModel.AdminStaffId = AdminStaff.AdminStaffId;
                model.Add(AdminStaffModel);
            }
            return(View(model));
        }
        public ActionResult Create()
        {
            UserPermissionAction("adminStaff", RoleAction.create.ToString());
            CheckPermission();
            var             CustomerId      = Convert.ToInt32(Session["CustomerId"]) == null ? 0 : Convert.ToInt32(Session["CustomerId"]);
            AdminStaffModel AdminStaffModel = new CommunicationApp.Models.AdminStaffModel();

            AdminStaffModel.CustomerId = CustomerId;
            return(View(AdminStaffModel));
        }
        // GET: /Customer/Edit/5
        public ActionResult Edit(int id)
        {
            AdminStaffModel AdminStaffModel = new CommunicationApp.Models.AdminStaffModel();
            var             AdminStaff      = _AdminStaffService.GetAdminStaff(id);

            if (AdminStaff != null)
            {
                var models = new List <AdminModel>();
                Mapper.CreateMap <CommunicationApp.Entity.AdminStaff, CommunicationApp.Models.AdminStaffModel>();
                AdminStaffModel = Mapper.Map <CommunicationApp.Entity.AdminStaff, CommunicationApp.Models.AdminStaffModel>(AdminStaff);
                if (AdminStaffModel.PhotoPath == null && AdminStaffModel.PhotoPath == "")
                {
                    AdminStaffModel.PhotoPath = CommonCls.GetURL() + "/images/noImage.jpg";
                }
            }

            return(View(AdminStaffModel));
        }