Esempio n. 1
0
 internal List<VisitorsModel> HomeOwnerVisitors(HomeOwnersModel homeOwner)
 {
     AddParameter("@homeownerid",homeOwner.HomeOwnerID);
     DataTable Dt_HomeOwnerVisitorsList = this.GetDataTable("usp_GetHomeOwnerVisitorsList");
     visitorsList = new List<VisitorsModel>();
     if (Dt_HomeOwnerVisitorsList.Rows.Count > 0)
     {
         foreach (DataRow dr in Dt_HomeOwnerVisitorsList.Rows)
         {
             visitorObj = new VisitorsModel();
             visitorObj.VisitorID = Convert.ToInt64(dr["VisitorID"].ToString());
             visitorObj.VisitorName = dr["VisitorName"].ToString();
             visitorObj.VisitorTypeID = dr["VisitorTypeID"].ToString();
             visitorObj.VisitorType = dr["VisitorType"].ToString();
             visitorObj.VisitingDate = dr["VisitingDate"].ToString();
             visitorObj.MobileNo = dr["MobileNo"].ToString();
             visitorObj.EmailID = dr["EmailID"].ToString();
             visitorObj.VisitingTo = dr["VisitingTo"].ToString();
             visitorObj.Comments = dr["Comments"].ToString();
             //visitorObj.Status = dr["Status"].ToString();
             visitorObj.CreatedOn = Convert.ToDateTime(dr["CreatedOn"].ToString());
             visitorObj.CreatedUserID = Convert.ToInt64(dr["CreatedUserID"].ToString());
             visitorObj.CreatedRoleID = Convert.ToByte(dr["CreatedRoleID"].ToString());
             if (!String.IsNullOrEmpty(dr["ModifiedOn"].ToString()))
             {
                 visitorObj.ModifiedOn = Convert.ToDateTime(dr["ModifiedOn"].ToString());
                 visitorObj.ModifiedUserID = Convert.ToInt64(dr["ModifiedUserID"].ToString());
                 visitorObj.ModifiedRoleID = Convert.ToByte(dr["ModifiedRoleID"].ToString());
             }
             visitorsList.Add(visitorObj);
         }
     }
     return visitorsList;
 }
 public ActionResult NewHomeOwner(HomeOwnersModel homeOwner)
 {
     if (this.ModelState.IsValid)
     {
         homeOwner.HO_CreatedOn = Convert.ToDateTime(DateTime.Now.ToString());
         homeOwner.HO_CreatedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
         homeOwner.HO_CreatedRoleID = Convert.ToByte(useMyCookie["RoleID"].ToString());
         return Json(homeOwnersDAL.AddHomeOwner(homeOwner));
     }
     else
         return AjaxDataError("HomeOwner");
 }
        public ActionResult RegistrationPartial(String roleid)
        {
            if (RoleIDSanctityCheck(roleid))
            {
                String partial = null;
                ViewBag.CommunityID = myCommunityID;
                Object loadModel = null;
                switch (roleid)
                {
                    case "2": partial = "Administrators/NewAdministrator";
                        administrator = new AdministratorsModel();
                        administrator.CommunityID = myCommunityID;
                        loadModel = administrator;
                        break;
                    case "3": partial = "SecurityManagers/NewSecurityManager";
                        securityManager = new SecurityManagersModel();
                        securityManager.CommunityID = myCommunityID;
                        loadModel = securityManager;
                        break;
                    case "4": partial = "SecurityPersonnels/NewSecurityPerson";
                        securityPersonnel = new SecurityPersonnelsModel();
                        securityPersonnel.CommunityID = myCommunityID;
                        loadModel = securityPersonnel;
                        break;
                    case "5": partial = "HomeOwners/NewHomeOwner";
                        homeOwner = new HomeOwnersModel();
                        homeOwner.CommunityID = myCommunityID;
                        loadModel = homeOwner;
                        break;
                    case "6": partial = "ServiceProviders/NewServiceProvider";
                        serviceProvider = new ServiceProvidersModel();
                        serviceProvider.CommunityID = myCommunityID;
                        loadModel = serviceProvider;
                        break;
                }

                return PartialView("Partials/Users/" + partial, loadModel);
            }
            else
                return AjaxParamError("Role");
        }
 public ActionResult HomeOwnerDetails(String homeownerid)
 {
     if (HomeOwnerIDSanctityCheck(homeownerid))
     {
         homeOwner = new HomeOwnersModel();
         homeOwner.CommunityID = myCommunityID;
         homeOwner.HomeOwnerID = Convert.ToInt64(homeownerid);
         return PartialView("Partials/Users/HomeOwners/HomeOwnerDetails", homeOwnersDAL.EditHomeOwner(homeOwner));
     }
     else
         return AjaxParamError("HomeOwner");
 }
        public ActionResult HomeOwnersListTable()
        {
            homeOwner = new HomeOwnersModel();
            homeOwner.CommunityID = myCommunityID;
            ViewBag.HomeOwnersList = homeOwnersDAL.HomeOwnersList(homeOwner);

            return PartialView("Partials/Users/HomeOwners/HomeOwnersListTable");
        }
 private void HomeOwnersList()
 {
     homeOwner = new HomeOwnersModel();
     homeOwner.CommunityID = myCommunityID;
     ViewBag.HomeOwnersList = homeOwnersDAL.HomeOwnersList(homeOwner);
 }
        public ActionResult DeleteHomeOwner(String homeownerid)
        {
            if (HomeOwnerIDSanctityCheck(homeownerid))
            {
                homeOwner = new HomeOwnersModel();
                homeOwner.CommunityID = myCommunityID;
                homeOwner.HomeOwnerID = Convert.ToInt64(homeownerid);
                homeOwner.HO_ModifiedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
                homeOwner.HO_ModifiedOn = Convert.ToDateTime(DateTime.Now.ToShortDateString());

                return Json(homeOwnersDAL.DeleteHomeOwner(homeOwner));
            }
            else
                return AjaxParamError("HomeOwner");
        }
 public ActionResult HomeOwnersListTable(String communityid)
 {
     if (CommunityIDSanctityCheck(communityid))
     {
         homeOwner = new HomeOwnersModel();
         homeOwner.CommunityID = outCommunityID;
         return PartialView("Partials/Users/HomeOwners/HomeOwnersListTable", homeOwnersDAL.HomeOwnersList(homeOwner));
     }
     else
         return AjaxParamError("Community");
 }
 public ActionResult UpdateHomeOwner(HomeOwnersModel homeOwner)
 {
     if (this.ModelState.IsValid)
     {
         homeOwner.CommunityID = myCommunityID;
         homeOwner.HO_ModifiedUserID = Convert.ToInt64(useMyCookie["UserID"].ToString());
         homeOwner.HO_ModifiedOn = Convert.ToDateTime(DateTime.Now.ToShortDateString());
         return Json(homeOwnersDAL.UpdateHomeOwner(homeOwner));
     }
     else
         return AjaxDataError("HomeOwner");
 }
 private void NewHomeOwnerCommunity(ref HomeOwnersModel newhomeowner)
 {
     homeOwnersDAL.NewHomeOwnerCommunity(ref newhomeowner);
 }
Esempio n. 11
0
        internal object AddHomeOwner(HomeOwnersModel homeOwner)
        {
            AddParameter("@communityid", homeOwner.CommunityID);

            AddParameter("@username", homeOwner.EmailID);
            AddParameter("@password", homeOwner.Password);
            AddParameter("@hintquestionid", homeOwner.HO_HintQuestionID);
            AddParameter("@hint", homeOwner.HO_Hint);

            AddParameter("@firstname", homeOwner.HO_FirstName);
            AddParameter("@middlename", homeOwner.HO_MiddleName);
            AddParameter("@lastname", homeOwner.HO_LastName);
            AddParameter("@mobile", homeOwner.HO_Mobile);
            AddParameter("@homephone", homeOwner.HO_HomePhone);
            AddParameter("@workphone", homeOwner.HO_WorkPhone);
            AddParameter("@address1", homeOwner.HO_Address1);
            AddParameter("@address2", homeOwner.HO_Address2);
            AddParameter("@directions", homeOwner.HO_Directions);

            AddParameter("@createdon", homeOwner.HO_CreatedOn);
            AddParameter("@createduserid", homeOwner.HO_CreatedUserID);
            AddParameter("@createdroleid", homeOwner.HO_CreatedRoleID);

            return this.ExecuteScalar("usp_AddHomeOwner");
        }
Esempio n. 12
0
        public List<HomeOwnersModel> HomeOwnersList(HomeOwnersModel homeowner)
        {
            AddParameter("@communityid", homeowner.CommunityID);
            DataTable Dt_HomeOwnersList = this.GetDataTable("usp_GetHomeOwnersList");
            homeOwnersList = new List<HomeOwnersModel>();
            if (Dt_HomeOwnersList.Rows.Count > 0)
            {
                foreach (DataRow dr in Dt_HomeOwnersList.Rows)
                {
                    homeOwnerObj = new HomeOwnersModel();

                    homeOwnerObj.HomeOwnerID = Convert.ToInt64(dr["HomeOwnerID"].ToString());

                    homeOwnerObj.EmailID = dr["UserName"].ToString();
                    homeOwnerObj.HO_HintQuestionID = Convert.ToByte(dr["HintQuestionID"].ToString());
                    homeOwnerObj.HO_HintQuestion = dr["HintQuestion"].ToString();
                    homeOwnerObj.HO_Hint = dr["Hint"].ToString();
                    homeOwnerObj.VFCode = dr["VFCode"].ToString();
                    homeOwnerObj.UserStatus = Convert.ToChar(dr["Status"]);
                    homeOwnerObj.UserID = homeOwnerObj.HomeOwnerID;
                    homeOwnerObj.Password = dr["Password"].ToString();
                    homeOwnerObj.RoleID = Convert.ToByte(dr["RoleID"].ToString());
                    homeOwnerObj.Role = dr["Role"].ToString();

                    homeOwnerObj.CommunityID = Convert.ToInt16(dr["CommunityID"].ToString());
                    homeOwnerObj.CommunityName = dr["CommunityName"].ToString();
                    homeOwnerObj.CommunityAddress = dr["CommunityAddress"].ToString();
                    homeOwnerObj.City = dr["City"].ToString();
                    homeOwnerObj.Zip = dr["Zip"].ToString();
                    homeOwnerObj.State = dr["State"].ToString();
                    homeOwnerObj.Country = dr["Country"].ToString();
                    homeOwnerObj.CommunityPhone1 = dr["CommunityPhone1"].ToString();
                    homeOwnerObj.CommunityPhone2 = dr["CommunityPhone2"].ToString();
                    homeOwnerObj.CommunityEmail = dr["CommunityEmail"].ToString();
                    homeOwnerObj.TotalUnits = Convert.ToByte(dr["TotalUnits"].ToString());
                    homeOwnerObj.MaxGates = Convert.ToByte(dr["MaxGates"].ToString());
                    homeOwnerObj.MenuOptions = dr["MenuOptions"].ToString();

                    homeOwnerObj.HO_FirstName = dr["FirstName"].ToString();
                    homeOwnerObj.HO_MiddleName = dr["MiddleName"].ToString();
                    homeOwnerObj.HO_LastName = dr["LastName"].ToString();
                    homeOwnerObj.HO_Mobile = dr["Mobile"].ToString();
                    homeOwnerObj.HO_HomePhone = dr["HomePhone"].ToString();
                    homeOwnerObj.HO_WorkPhone = dr["WorkPhone"].ToString();
                    homeOwnerObj.HO_Address1 = dr["Address1"].ToString();
                    homeOwnerObj.HO_Address2 = dr["Address2"].ToString();
                    homeOwnerObj.HO_Directions = dr["Directions"].ToString();

                    homeOwnerObj.HO_CreatedOn = Convert.ToDateTime(dr["CreatedOn"].ToString());
                    homeOwnerObj.HO_CreatedUserID = Convert.ToInt64(dr["CreatedUserID"].ToString());
                    homeOwnerObj.HO_CreatedRoleID = Convert.ToByte(dr["CreatedRoleID"].ToString());

                    if (!String.IsNullOrEmpty(dr["ModifiedOn"].ToString()))
                    {
                        homeOwnerObj.HO_ModifiedOn = Convert.ToDateTime(dr["ModifiedOn"].ToString());
                        homeOwnerObj.HO_ModifiedUserID = Convert.ToInt64(dr["ModifiedUserID"].ToString());
                        homeOwnerObj.HO_ModifiedRoleID = Convert.ToByte(dr["ModifiedRoleID"].ToString());
                    }
                    homeOwnersList.Add(homeOwnerObj);
                }
            }
            return homeOwnersList;
        }
Esempio n. 13
0
        internal void NewHomeOwnerCommunity(ref HomeOwnersModel homeowner)
        {
            CommunitiesModel community = new CommunitiesModel();
            CommunitiesModel communityDetails = new CommunitiesModel();

            community.CommunityID = homeowner.CommunityID;
            CommunitiesDAL communitiesDAL = new CommunitiesDAL();
            communityDetails = communitiesDAL.CommunityDetails(community);

            homeowner.CommunityName = communityDetails.CommunityName;
            homeowner.CommunityAddress = communityDetails.CommunityAddress;
            homeowner.City = communityDetails.City;
            homeowner.Zip = communityDetails.Zip;
            homeowner.State = communityDetails.State;
            homeowner.Country = communityDetails.Country;
        }
Esempio n. 14
0
        internal Object DeleteHomeOwner(HomeOwnersModel homeowner)
        {
            AddParameter("@homeownerid", homeowner.HomeOwnerID);
            AddParameter("@communityid", homeowner.CommunityID);

            AddParameter("@modifiedon", homeowner.HO_ModifiedOn);
            AddParameter("@modifieduserid", homeowner.HO_ModifiedUserID);
            AddParameter("@modifiedroleid", homeowner.HO_ModifiedRoleID);
            return ExecuteScalar("usp_DeleteHomeOwner");
        }