public void DeleteFences(int id) { var item = FencesManager.GetById(id); item.Status = false; item.UpdatedBy = Membership.GetUser().ProviderUserKey.ToString(); FencesManager.Save(item); }
public int AddFence(GeoFence fence) { var f = FencesManager.GetById(fence.FencesId); f.FencesName = fence.FencesName; f.FencesCoordinate = fence.FencesCoordinate; //f.GeoFenceTypes = FencesManager.GetFencesTypeById(Convert.ToInt32(fence.TempTypeId)) ; f.Details = fence.Details; f.IsPublic = fence.IsPublic; f.Zoom = fence.Zoom; if (f.FencesId == 0) { f.CreatedBy = Membership.GetUser().ProviderUserKey.ToString(); f.Status = true; } f.UpdatedBy = Membership.GetUser().ProviderUserKey.ToString(); FencesManager.Save(f); return(f.FencesId); //???? }