예제 #1
0
        /// <summary>
        /// Edit infomation of selected user
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>
        /// Author:			PhatLT. FPTSS.
        /// Created date:	14/02/2011
        /// </remarks>
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            if (_manager == null || _manager.Position < 0)
            {
                return;
            }

            DataRowView rview    = (DataRowView)_manager.Current;
            DataRow     row      = rview.Row;
            string      username = (string)row["USERNAME"];

            frmAddUser frm = new frmAddUser(username);

            clsFormManager.ShowDialogMDIChild(frm);
            //frm.ShowDialog();
            DataRow user = frm.User;

            if (user != null)
            {
                row["USERNAME"]  = user["USERNAME"];
                row["FIRSTNAME"] = user["FIRSTNAME"];
                row["LASTNAME"]  = user["LASTNAME"];
                row["EMAIL"]     = user["EMAIL"];
                row["STATUS"]    = user["STATUS"];
                row["UROLE_ID"]  = user["UROLE_ID"];
            }
            row.AcceptChanges();
            //InitData();
        }
예제 #2
0
        /// <summary>
        /// Add new user
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>
        /// Author:			PhatLT. FPTSS.
        /// Created date:	14/02/2011
        /// </remarks>
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            frmAddUser frm = new frmAddUser();

            clsFormManager.ShowMDIChild(frm, this);
            //frm.ShowDialog();
            //InitData();
        }
예제 #3
0
        /// <summary>
        /// Edit infomation of selected user
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>
        /// Author:			PhatLT. FPTSS.
        /// Created date:	14/02/2011
        /// </remarks>
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            if(_manager == null || _manager.Position < 0 )
                return;

            DataRowView rview = (DataRowView)_manager.Current;
            DataRow row = rview.Row;
            string username = (string)row["USERNAME"];

            frmAddUser frm = new frmAddUser(username);
            clsFormManager.ShowDialogMDIChild(frm);
            //frm.ShowDialog();
            DataRow user = frm.User;
            if(user != null)
            {
                row["USERNAME"] = user["USERNAME"];
                row["FIRSTNAME"] = user["FIRSTNAME"];
                row["LASTNAME"] = user["LASTNAME"];
                row["EMAIL"] = user["EMAIL"];
                row["STATUS"] = user["STATUS"];
                row["UROLE_ID"] = user["UROLE_ID"];
            }
            row.AcceptChanges();
            //InitData();
        }
예제 #4
0
 /// <summary>
 /// Add new user
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <remarks>
 /// Author:			PhatLT. FPTSS.
 /// Created date:	14/02/2011
 /// </remarks>
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     frmAddUser frm = new frmAddUser();
     clsFormManager.ShowMDIChild(frm, this);
     //frm.ShowDialog();
     //InitData();
 }