Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Master.selected = "default";
     string connectionString = ConfigurationManager.ConnectionStrings["iPortendConnectionString"].ConnectionString;
     Facebook.Schema.user u = Master.Api.Users.GetInfo();
     string userid = u.uid.ToString();
     string username = u.first_name;
     lblInfo.Text = "Welcome to iPortend beta!" + "  uid = " + userid + " name = " + username;
     //CheckExist(userID);
     PredictionRepository repo = new PredictionRepository();
     var FaceUser = repo.CheckUser(userid);
     if (FaceUser.Count() == 0)
     {
         PreMembership member = new PreMembership();
         member.UserId = new Guid();
         member.UserType = 1;
         member.UserFaceID = u.uid.ToString();
         repo.AddUser(member);
         repo.Save();
     }
     Category.DataSource = repository.categoryList();
     Category.DataTextField = "Description";
     Category.DataValueField = "CategoryID";
     Category.DataBind();
     
 }
Ejemplo n.º 2
0
 partial void DeletePreMembership(PreMembership instance);
Ejemplo n.º 3
0
 partial void UpdatePreMembership(PreMembership instance);
Ejemplo n.º 4
0
 partial void InsertPreMembership(PreMembership instance);
Ejemplo n.º 5
0
 public void AddUser(PreMembership member)
 {
     dataContext.PreMemberships.InsertOnSubmit(member);
 }