示例#1
0
        private void llblChangeSearch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            LocationPrompt lp     = new LocationPrompt();
            var            result = lp.ShowDialog();

            if (result == DialogResult.OK)
            {
                this._LocString = lp.LocString;
            }
        }
示例#2
0
        public bool CreateLocationPrompt(LocationPromptCreate model)
        {
            var entity =
                new LocationPrompt()
            {
                AdminId    = _userId,
                Location   = model.Location,
                CreatedUtc = DateTimeOffset.Now
            };

            using (var ctx = new ApplicationDbContext())
            {
                ctx.LocationPrompts.Add(entity);
                return(ctx.SaveChanges() == 1);
            }
        }