コード例 #1
0
 private void create(Channel joinChannel, string username)
 {
     joinChannel.Closed = false;
     db.Channels.InsertOnSubmit(joinChannel);
     db.SubmitChanges();
     join(joinChannel.Name, username, 3);
 }
コード例 #2
0
 public void join(Channel joinChannel, string username)
 {
     if (getChannel(joinChannel.Name) == null)
     {
         create(joinChannel, username);
     }
     else
     {
         join(joinChannel.Name, username, 1);
     }
 }
コード例 #3
0
        public ActionResult Join(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here
                Channel joinChannel = new Channel();
                String[] wl = { "Name" };
                UpdateModel(joinChannel, wl);
                try
                {
                    chRep.join(joinChannel, User.Identity.Name);
                }
                catch (NotInvitedException e)
                {
                    return View("NotInvited");
                }

                return RedirectToAction("Index");
            }
            catch
            {
                return View("Error");
            }
        }
コード例 #4
0
 public ActionResult Join(string id)
 {
     Channel c = new Channel();
     c.Name = id;
     return View(c);
 } 
コード例 #5
0
 partial void DeleteChannel(Channel instance);
コード例 #6
0
 partial void UpdateChannel(Channel instance);
コード例 #7
0
 partial void InsertChannel(Channel instance);