コード例 #1
0
        /// <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();
        }
コード例 #2
0
 /// <summary>
 /// Update des Users
 /// </summary>
 /// <returns>true if successful</returns>
 public bool Update()
 {
     clsUserCollection _usrCol = new clsUserCollection();
     return (_usrCol.UpdateUser(this) == 1);
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 clsUserCollection _usrCol;  // Objektvariable für User-Collection, wird im Konstruktor instantiiert
 /// <summary>
 /// Konstruktor
 /// </summary>
 public clsUserFacade()
 {
     _usrCol = new clsUserCollection();
 }
コード例 #5
0
        clsUserCollection _usrCol; // Objektvariable für User-Collection, wird im Konstruktor instantiiert

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Konstruktor
        /// </summary>
        public clsUserFacade()
        {
            _usrCol = new clsUserCollection();
        }
コード例 #6
0
        } // 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()
コード例 #7
0
        /// <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()