Esempio n. 1
0
 public Passreq_win(Main_win super, Profile_win profile, int id)
 {
     InitializeComponent();
     this.profile = profile;
     this.super   = super;
     user_id      = id;
 }
Esempio n. 2
0
 public Reg_win(Profile_win profile, int id, string fname, string sname, string pname, string login, string pass)
 {
     InitializeComponent();
     Title              = "Редактирование";
     b_reg.Click       += B_edit_Click;
     this.profile       = profile;
     user_id            = id;
     tb_name.Text       = this.fname = fname;
     tb_sname.Text      = this.sname = sname;
     tb_pname.Text      = this.pname = pname;
     tb_login.Text      = this.login = login;
     tb_pass.Password   = this.pass = pass;
     tb_repass.Password = pass;
 }
Esempio n. 3
0
        private void B_profile_Click(object sender, RoutedEventArgs e)
        {
            NpgsqlCommand    comm = new NpgsqlCommand("select sname||' '||fname||' '||pname, login from my_own_admin(" + user_id + ")", conn);
            NpgsqlDataReader reader;
            string           name = null, login = null;

            try
            {
                conn.Open();
                reader = comm.ExecuteReader();
                for (int i = 0; reader.Read(); i++)
                {
                    name  = reader.GetString(0);
                    login = reader.GetString(1);
                }
                Profile_win profile = new Profile_win(this, name, login);
                profile.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            conn.Close();
        }