Exemplo n.º 1
0
 private void ListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ListBox.SelectedItem != null)
     {
         var results = Tree.Nodes.Find(((Mainframe.StringAndIndex)ListBox.SelectedItem).Index.ToString(), true);
         if (results.Length == 1)
         {
             EventNameInput.Clear();
             Tree.SelectedNode = results[0];
         }
     }
 }
        public ActionResult Create(CreateEvent ec1, EventNameInput ec2)
        {
            ec2.Name = @Session["FullName"].ToString();

            ec1.EventCreator = @Session["FullName"].ToString();

            if (ec1.Time != null)
            {
                _dbc.Configuration.ValidateOnSaveEnabled = false;
                x.Configuration.ValidateOnSaveEnabled    = false;
                _dbc.Events.Add(ec1);
                x.NameList.Add(ec2);
                _dbc.SaveChanges();
                x.SaveChanges();
                ViewBag.message = "Record " + ec1.EventID + " saved";
                return(View(ec1));
            }



            return(View());
            //return RedirectToAction("Index");
        }