x.MimeType == "image/png"), enc); (fctx =. IO.File.CreateText (HttpContext.Request.MapPath ("~/app_data/images /") + image. id +
". min"))
{. Write ("data: image/png; base64," + Convert.ToBase64String (memory.GetBuffer ()));
}
}
}. SaveChanges (); js = Json (new ImageModel (image) {Data = ""}); js;
}
}
[HttpGet] ActionResult FriendList ()
{View ();
}
[HttpPost] ActionResult FriendList (int offset, int count)
{(var ctx = new WINEntities ())
{cnt = ctx.Users.LongCount (); (cnt <15)
{(offset> cnt) offset = 0; = (int) cnt - offset;
} if ((offset + count)> cnt)
{Content ("Упс, помилочка ...");
} users = (from user in ctx.Users orderby user.rate select user). Skip (offset). Take (count). ToList (); result = new List (); (var user in users)
{. Add (new UserModel (user));
} Json (result);
}
}
}
}
{class UserController: Controller
{
//
// GET:/User/ActionResult Index ()
{RedirectToAction ("Index", "Home");
}
[HttpGet] ActionResult Index (Guid uid)
{. uid = uid; View ();
}
[HttpPost] ActionResult GetInfo (Guid uid)
{ctx = new WINEntities (); Json (new UserModel (ctx.Users.SingleOrDefault (x => x.id == uid)));
}
}
}
.1.2 Уявлення
@ {. Title = "Login";
}
# authpanel
{: absolute; color: # 99CCFF;: 2em 25% 3% 25%;: 0.5em;: 20%;: 35%;: 15%;: 28%;: 40%;
moz-border-radius: 5px;
khtml-border-radius: 10px; width: 300px;
}
# welcome
{: absolute;: 28%;: 20%;: left;: 35%;/* height: 35%; */radius: 6px;
moz-border-radius: 5px;
khtml-border-radius: 10px; width: 300px;
}
. authhelper
{: 100%;: 1.5em;
}
. authhelper: hover
{: 1.5px; color: Black;