コード例 #1
0
 public Guide(string i)
 {
     InitializeComponent();
     this.id       = i;
     sg            = db.User_View(id, sg);
     textBox2.Text = sg.FName;
     textBox3.Text = sg.LName;
     textBox4.Text = sg.Age;
     textBox5.Text = sg.Gender;
 }
コード例 #2
0
 public EditGuide(string i, ref SignUpG sg1)
 {
     this.id = i;
     this.sg = sg1;
     InitializeComponent();
     comboBox1.Text = sg.Lan1;
     comboBox2.Text = sg.Lan2;
     comboBox3.Text = sg.aval;
     textBox1.Text  = sg.Address;
     textBox7.Text  = sg.Charge;
 }
コード例 #3
0
        public SignUpG User_View(string ID, SignUpG u)// userprofile collecting information from database
        {
            try
            {
                // string s = "select FistName ,LastName , IEEE_ID , Dept , Gender , DOB,Password, Contact , MembershipType,Email from Member where AIUB_ID ='" +AIUB_ID + "';";
                string     s1     = "select * from Guide where email='" + ID + "';";
                SqlCommand newCmd = new SqlCommand(s1, con);
                newCmd.Parameters.Add("@email", SqlDbType.Char).Value = ID;
                con.Open();
                SqlDataReader rdr = newCmd.ExecuteReader();
                rdr.Read();
                u.Gender           = rdr.GetString(1);
                u.Age              = rdr.GetString(2);
                u.Country          = rdr.GetString(3);
                u.State            = rdr.GetString(4);
                u.Address          = rdr.GetString(5);
                u.RefPersonName    = rdr.GetString(6);
                u.RefPersonContact = rdr.GetString(7);
                u.RefPersonContact = rdr.GetString(8);
                u.Area             = rdr.GetString(9);
                u.Food             = rdr.GetString(10);
                u.Charge           = rdr.GetString(11);
                u.Lan1             = rdr.GetString(13);
                u.Lan2             = rdr.GetString(14);
                u.aval             = rdr.GetString(15);
                con.Close();
                string     s2      = "select * from NormalU where email='" + ID + "';";
                SqlCommand newCmd1 = new SqlCommand(s2, con);
                newCmd1.Parameters.Add("@email", SqlDbType.Char).Value = ID;
                con.Open();
                SqlDataReader rdr1 = newCmd1.ExecuteReader();
                rdr1.Read();
                u.FName   = rdr1.GetString(1);
                u.LName   = rdr1.GetString(2);
                u.Type    = rdr1.GetString(6);
                u.Contact = rdr1.GetString(5);
                con.Close();
                return(u);

                // return rdr;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(u);
            }
        }
コード例 #4
0
 public SignUpForGuide(string i, SignUpG s)
 {
     this.id = i;
     this.sg = s;
     InitializeComponent();
 }
コード例 #5
0
 public SignUpForGuide3(string i, ref SignUpG sg1)
 {
     this.id = i;
     this.sg = sg1;
     InitializeComponent();
 }