private async Task Updateprofile() { try { progressload.IsVisible = true; lblprogressstat.Text = "Saving profile . . ."; var user = new TBL_Users { Id = user_id, full_name = fullname, mobile_num = mobilenum, emailadd = emailadd, password = password, datereg = datereg, propic = $"{_url}/{_imgId}.jpg", picstr = $"{_imgId}.jpg" }; propic = user.propic; picstr = user.picstr; await TBL_Users.Update(user); progressload.IsVisible = false; } catch { progressload.IsVisible = false; await Navigation.PushAsync(new NoInternetPage(), true); } }
public ActionResult DeleteConfirmed(int id) { TBL_Users tBL_Users = db.TBL_Users.Find(id); db.TBL_Users.Remove(tBL_Users); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Guncelle(TBL_Users p1) { var usr = db.TBL_Users.Find(p1.UserId); usr.UserName = p1.UserName; usr.UserPassword = p1.UserPassword; db.SaveChanges(); return(Redirect("Index")); }
public ActionResult Edit([Bind(Include = "UserId,UserName,UserPassword")] TBL_Users tBL_Users) { if (ModelState.IsValid) { db.Entry(tBL_Users).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_Users)); }
public ActionResult Create([Bind(Include = "UserId,UserName,UserPassword")] TBL_Users tBL_Users) { if (ModelState.IsValid) { db.TBL_Users.Add(tBL_Users); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_Users)); }
public LmpPrincipal(TBL_Users user) { UserId = user.Id; Username = user.Username; EmployeeNo = user.EmployeeNo; Department = user.Department; DisplayName = user.DisplayName; EmailAddress = user.EmailAddress; ContactId = user.ContactId; Image = user.TBL_Contacts.ContactImg; Roles = user.TBL_UserRoleMap.Select(r => r.TBL_Roles.RoleName).ToArray(); }
public LmpMemberShipUser(TBL_Users user) : base("LmpMembership", user.Username, user.Id, user.EmailAddress, string.Empty, string.Empty, true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now) { Id = user.Id; Username = user.Username; EmployeeNo = user.EmployeeNo; Department = user.Department; DisplayName = user.DisplayName; EmailAddress = user.EmailAddress; ContactId = user.ContactId; Contact = user.TBL_Contacts; Roles = user.TBL_UserRoleMap; }
public ActionResult GirisYap(TBL_Users t) { var bilgiler = db.TBL_Users.FirstOrDefault(x => x.UserName == t.UserName && x.UserPassword == t.UserPassword); if (bilgiler != null) { FormsAuthentication.SetAuthCookie(bilgiler.UserName, false); return(RedirectToAction("Index", "Urunler")); } else { return(View()); } }
// GET: Deneme/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TBL_Users tBL_Users = db.TBL_Users.Find(id); if (tBL_Users == null) { return(HttpNotFound()); } return(View(tBL_Users)); }
private async void Button_OnClicked(object sender, EventArgs e) { try { if (entryfullname.Text == null) { await DisplayAlert("Error", "Please Enter your full name!", "Ok"); entryfullname.Focus(); return; } if (entrymobile.Text == null) { await DisplayAlert("Error", "Please Enter your mobile number!", "Ok"); entrymobile.Focus(); return; } progresssave.IsVisible = true; lblprogressstat.Text = "Saving profile . . ."; var profile = new TBL_Users { Id = user_id, full_name = entryfullname.Text, mobile_num = entrymobile.Text, emailadd = emailadd, password = password, datereg = datereg, propic = propic, picstr = picstr }; fullname = entryfullname.Text; await TBL_Users.Update(profile); progresssave.IsVisible = false; await DisplayAlert("Info", "Profile information updated!", "Ok"); await Navigation.PopAsync(true); } catch { progresssave.IsVisible = false; await Navigation.PushAsync(new NoInternetPage(), true); } }
private async void Btnregister_OnClicked(object sender, EventArgs e) { try { if (NameEntry.Text == null) { await DisplayAlert("Field required", "Please enter you full name. This will be used upon checking out items or picking them up.", "OK"); NameEntry.Focus(); return; } if (mobileentry.Text == null) { await DisplayAlert("Field required", "Please enter you mobile number.", "OK"); mobileentry.Focus(); return; } if (emailentry.Text == null) { await DisplayAlert("Field required", "Please enter your email address", "OK"); emailentry.Focus(); return; } if (passentry.Text == null) { await DisplayAlert("Field required", "Please enter your password", "OK"); passentry.Focus(); return; } if (confirmpassentry.Text == null) { await DisplayAlert("Field required", "Please confirm your password", "OK"); confirmpassentry.Focus(); return; } if (lblerror.IsVisible) { await DisplayAlert("Error", "Invalid email address!", "OK"); emailentry.Focus(); return; } if (loadingindicator.IsVisible) { return; } if (passentry.Text == confirmpassentry.Text) { var user = new TBL_Users { full_name = NameEntry.Text, mobile_num = mobileentry.Text, emailadd = emailentry.Text, password = passentry.Text, datereg = DateTime.Now }; loadingindicator.IsVisible = true; loadingindicator.IsRunning = true; indicatornot.IsVisible = true; await TBL_Users.Insert(user); await DisplayAlert("Success", "You've successfully signed up! Please login to your account now!", "OK"); indicatornot.IsVisible = false; loadingindicator.IsVisible = false; await Navigation.PopAsync(true); } else { await DisplayAlert("Confirm password", "Password did not match!", "OK"); confirmpassentry.Focus(); } } catch { indicatornot.IsVisible = false; loadingindicator.IsVisible = false; await DisplayAlert("Error", "There was an error processing your request. " + "The email address you've entered already exist. Please try another one. " + "Please check you internet connectivity as well.", "OK"); } }
public ActionResult YeniKullanici(TBL_Users p1) { db.TBL_Users.Add(p1); db.SaveChanges(); return(RedirectToAction("Index")); }
private async void Button_OnClicked(object sender, EventArgs e) { try { var oldpass = string.IsNullOrEmpty(entreyoldpass.Text); var newpass = string.IsNullOrEmpty(entrynewpass.Text); var newpassconfirm = string.IsNullOrEmpty(entrynewpassconfirm.Text); if (oldpass || newpass || newpassconfirm) { await DisplayAlert("Error", "Please Enter your old password and confirm your new password!", "OK"); return; } if (entrynewpass.Text != entrynewpassconfirm.Text) { await DisplayAlert("Confirm password", "New Password did not match!", "OK"); return; } progresssave.IsVisible = true; lblstat.Text = "Saving. . ."; var users = (await MobileService.GetTable <TBL_Users>().Where(usr => usr.emailadd == lblemail.Text).ToListAsync()).FirstOrDefault(); if (users == null) { return; } if (users.password == entreyoldpass.Text) { var newusersecurity = new TBL_Users { Id = user_id, full_name = fullname, mobile_num = mobilenum, emailadd = emailadd, password = entrynewpassconfirm.Text, datereg = datereg, propic = propic, picstr = picstr }; await TBL_Users.Update(newusersecurity); progresssave.IsVisible = false; await DisplayAlert("Info", "Security setting saved!", "OK"); await Navigation.PopAsync(true); } else { progresssave.IsVisible = false; await DisplayAlert("Error", "Old password is incorrect!", "OK"); entreyoldpass.Focus(); } } catch { progresssave.IsVisible = false; await Navigation.PushAsync(new NoInternetPage(), true); } }