コード例 #1
0
        public List <FencesModel> GetAllFances()
        {
            var lstFences = new List <FencesModel>();
            var getFences = FencesManager.GetByUserId(Membership.GetUser().ProviderUserKey.ToString());

            foreach (var item in getFences)
            {
                lstFences.Add(new FencesModel
                {
                    //FencesTypeId= item.TypeId?? 0,
                    FencesId         = item.FencesId,
                    FencesName       = item.FencesName,
                    FencesCoordinate = item.FencesCoordinate,
                    IsPublic         = item.IsPublic,
                    Details          = item.Details,
                    Status           = item.Status,
                    Zoom             = item.Zoom,
                    CreatedBy        = item.CreatedBy,
                    CreatedDate      = item.CreatedDate,
                    UpdatedBy        = item.UpdatedBy,
                    UpdatedDate      = item.UpdatedDate,
                });
            }
            return(lstFences);//FencesManager.GetByUserName(User.Identity.Name);
        }
コード例 #2
0
        public void FencesBind()
        {
            var fences = FencesManager.GetByUserId(Membership.GetUser().ProviderUserKey.ToString());

            CollectionHelper.PopulateListControl(dlFences, "FencesId", "FencesName", fences);
        }