Exemplo n.º 1
0
        private void Button3_Click(object sender, EventArgs e)
        {
            ViewUserForm vuf = new ViewUserForm();

            vuf.ShowDialog();
            this.Close();
        }
Exemplo n.º 2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            conn.Open();
            SqlCommand cmd       = new SqlCommand("SELECT USER_CREATOR FROM TBL_USERS WHERE USER_ID='" + txtUser_ID.Text + "'", conn);
            SqlCommand get_ident = new SqlCommand("SELECT USER_ID FROM TBL_USERS WHERE USER_ID='" + txtUser_ID.Text + "'", conn);

            Control_variables.identity_id = Convert.ToInt32(get_ident.ExecuteScalar());

            conn.Close();
            bool isactive = false;

            if (cmbStatus.Text == "Active")
            {
                isactive = true;
            }
            else
            {
                isactive = false;
            }
            ViewUserForm vuf      = new ViewUserForm();
            int          identity = Control_variables.identity_id;
            string       datenow  = DateTime.Now.ToShortDateString();

            db.SP_USERUPDATE(int.Parse(txtUser_ID.Text), txtLastname.Text, txtFirstname.Text, txtMiddlename.Text, txtUsername.Text, txtContactNo.Text, isactive, PB_image.ImageLocation);
            MessageBox.Show("Successfully Updated", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Close();
            ViewUserForm v = new ViewUserForm();

            v.ShowDialog();
        }
Exemplo n.º 3
0
        //public int CurrentID()
        //{
        //    return Convert.ToInt32(db.CURRENT_ID());
        //}

        private void btnView_Click(object sender, EventArgs e)
        {
            ViewUserForm v = new ViewUserForm();

            v.ShowDialog();
        }