/// <summary> /// Ereignis beim Klick auf den Auswahlknopf zur DropDownList /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDropDownSelect_Click(object sender, EventArgs e) { clsUser _myUser = new clsUser(); clsUserCollection _myUserCol = new clsUserCollection(); int _id = Convert.ToInt32(ddlUser.SelectedValue); _myUser = _myUserCol.GetUserById(_id); if (_myUser != null) lblMsg.Text = "Auswahl in DropDownList: " + _myUser.Name + " " + _myUser.Address; else lblMsg.Text = "Auswahl in DropDownList nicht gefunden: " + _id.ToString(); }
/// <summary> /// Update des Users /// </summary> /// <returns>true if successful</returns> public bool Update() { clsUserCollection _usrCol = new clsUserCollection(); return (_usrCol.UpdateUser(this) == 1); }
/// <summary> /// Einfügen dieses Users in die Datenbank /// </summary> /// <returns>true if successful</returns> public bool Insert() { clsUserCollection _usrCol = new clsUserCollection(); return (_usrCol.InsertUser(this) == 1); }
clsUserCollection _usrCol; // Objektvariable für User-Collection, wird im Konstruktor instantiiert /// <summary> /// Konstruktor /// </summary> public clsUserFacade() { _usrCol = new clsUserCollection(); }
clsUserCollection _usrCol; // Objektvariable für User-Collection, wird im Konstruktor instantiiert #endregion Fields #region Constructors /// <summary> /// Konstruktor /// </summary> public clsUserFacade() { _usrCol = new clsUserCollection(); }
} // Update() /// <summary> /// Lösche den Benutzer /// </summary> /// <returns>true if successful</returns> public bool Delete() { clsUserCollection _usrCol = new clsUserCollection(); return(_usrCol.DeleteUser(this) == 1); } // Update()
/// <summary> /// Einfügen dieses Users in die Datenbank /// </summary> /// <returns>true if successful</returns> public bool Insert() { clsUserCollection _usrCol = new clsUserCollection(); return(_usrCol.InsertUser(this) == 1); } // Insert()