protected void btnRegister_Click(object sender, EventArgs e) { bll.clsUser newUser = new bll.clsUser(); newUser.Address = inAdress.Text; newUser.Distance = Convert.ToInt32(inDistance.Text); newUser.IsActive = isActive.Checked; newUser.Name = inUsername.Text; newUser.Password = inPassword.Text; newUser.Role = Convert.ToInt32(inRole.SelectedValue); newUser.Insert(); }
protected void btnRegister_Click(object sender, EventArgs e) { bll.clsUser newUser = new bll.clsUser(); newUser.Address = inAdress.Text; newUser.Distance = Convert.ToInt32(inDistance.Text); newUser.IsActive = isActive.Checked; newUser.Name = inUsername.Text; newUser.Password = inPassword.Text; newUser.Role = Convert.ToInt32(inRole.SelectedValue); newUser.Insert(); }
/// <summary> /// wird bei Klick des Einfügen-Knopfs aufgerufen /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnInsert_Click(object sender, EventArgs e) { bll.clsUser newUser = new bll.clsUser(); // bll.clsUserFacade _User = new bll.clsUserFacade(); newUser.Name = txtName.Text; newUser.Address = txtAddress.Text; newUser.Role = Convert.ToInt32(rblRolle.SelectedValue); newUser.IsActive = chkIsActive.Checked; newUser.Password = txtPassword.Text; if (newUser.Insert()) lblMsg.Text = "Insert von " + newUser.Name + " erfolgreich!"; else lblMsg.Text = "Insert von " + newUser.Name + " NICHT erfolgreich!"; }
protected void btnInsert_Click(object sender, EventArgs e) { bll.clsUser toInsert = new bll.clsUser(); try { toInsert.Address = inAdress.Text; toInsert.Distance = Convert.ToInt32(inDistance.Text); toInsert.IsActive = checkActive.Enabled; toInsert.Name = inName.Text; toInsert.Password = inPassword.Text; toInsert.Role = Convert.ToInt32(ListRole.SelectedValue); toInsert.Insert(); } catch { lblError.Visible = true; lblError.Text = "Etwas ist schiefgelaufen bitte versuchen sie es erneut"; } Response.Redirect("ManagerManageUser.aspx"); }
protected void btnInsert_Click(object sender, EventArgs e) { bll.clsUser toInsert = new bll.clsUser(); try { toInsert.Address = inAdress.Text; toInsert.Distance = Convert.ToInt32(inDistance.Text); toInsert.IsActive = checkActive.Enabled; toInsert.Name = inName.Text; toInsert.Password = inPassword.Text; toInsert.Role = Convert.ToInt32(ListRole.SelectedValue); toInsert.Insert(); } catch { lblError.Visible = true; lblError.Text = "Etwas ist schiefgelaufen bitte versuchen sie es erneut"; } Response.Redirect("ManagerManageUser.aspx"); }
/// <summary> /// wird bei Klick des Einfügen-Knopfs aufgerufen /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnInsert_Click(object sender, EventArgs e) { bll.clsUser newUser = new bll.clsUser(); // bll.clsUserFacade _User = new bll.clsUserFacade(); newUser.Name = txtName.Text; newUser.Address = txtAddress.Text; newUser.Role = Convert.ToInt32(rblRolle.SelectedValue); newUser.IsActive = chkIsActive.Checked; newUser.Password = txtPassword.Text; if (newUser.Insert()) { lblMsg.Text = "Insert von " + newUser.Name + " erfolgreich!"; } else { lblMsg.Text = "Insert von " + newUser.Name + " NICHT erfolgreich!"; } } //btnInsert_Click()