private void 查看ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgv_tutors_all.SelectedRows.Count > 0)
     {
         string       ID             = dgv_tutors_all.SelectedRows[0].Cells[0].Value.ToString();
         string       parent_num     = dgv_tutors_all.SelectedRows[0].Cells[1].Value.ToString();
         string       print_num      = dgv_tutors_all.SelectedRows[0].Cells[2].Value.ToString();
         string       parent_name    = dgv_tutors_all.SelectedRows[0].Cells[3].Value.ToString();
         string       phone          = dgv_tutors_all.SelectedRows[0].Cells[4].Value.ToString();
         string       grade_subject  = dgv_tutors_all.SelectedRows[0].Cells[5].Value.ToString();
         string       student_sex    = dgv_tutors_all.SelectedRows[0].Cells[6].Value.ToString();
         string       tutors_state   = dgv_tutors_all.SelectedRows[0].Cells[7].Value.ToString();
         string       time           = dgv_tutors_all.SelectedRows[0].Cells[8].Value.ToString();
         string       tutors_price   = dgv_tutors_all.SelectedRows[0].Cells[9].Value.ToString();
         string       tutors_time    = dgv_tutors_all.SelectedRows[0].Cells[10].Value.ToString();
         string       dadd           = dgv_tutors_all.SelectedRows[0].Cells[11].Value.ToString();
         string       important_mark = dgv_tutors_all.SelectedRows[0].Cells[12].Value.ToString();
         string       payment_state  = dgv_tutors_all.SelectedRows[0].Cells[13].Value.ToString();
         string       payment_time   = dgv_tutors_all.SelectedRows[0].Cells[14].Value.ToString();
         Tutors_check myform         = new Tutors_check(ID, parent_num, print_num, parent_name, phone, grade_subject, student_sex,
                                                        tutors_state, time, tutors_price, tutors_time, dadd, important_mark, payment_state, payment_time);
         myform.Owner     = this;
         myform.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
         myform.Show();
     }
 }
Example #2
0
 private void 查看家教信息ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgv_responsibility.SelectedRows.Count > 0)
     {
         string parents_num = dgv_responsibility.SelectedRows[0].Cells[0].Value.ToString();
         string print_num   = dgv_responsibility.SelectedRows[0].Cells[1].Value.ToString();
         string mysql       = "SELECT 接待人 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string reception   = mydb.Returnafield(mysql);
         mysql = "SELECT ID FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string ID = mydb.Returnafield(mysql);
         mysql = "SELECT 接入时间 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string reception_time = mydb.Returnafield(mysql);
         mysql = "SELECT 家长称呼 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string parents_name = mydb.Returnafield(mysql);
         mysql = "SELECT 联系方式 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string phone = mydb.Returnafield(mysql);
         mysql = "SELECT 家教地址简单 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string sadd = mydb.Returnafield(mysql);
         mysql = "SELECT 家教地址详细 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string dadd = mydb.Returnafield(mysql);
         mysql = "SELECT 年级科目 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string grade_subject = mydb.Returnafield(mysql);
         mysql = "SELECT 学员性别 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string student_sex = mydb.Returnafield(mysql);
         mysql = "SELECT 家教价格 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string tutors_price = mydb.Returnafield(mysql);
         mysql = "SELECT 家教时间 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string tutors_time = mydb.Returnafield(mysql);
         mysql = "SELECT 教员要求性别 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string sex = mydb.Returnafield(mysql);
         mysql = "SELECT 教员要求地域 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string place = mydb.Returnafield(mysql);
         mysql = "SELECT 教员要求年级 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string grade = mydb.Returnafield(mysql);
         mysql = "SELECT 教员要求专业 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string subject = mydb.Returnafield(mysql);
         mysql = "SELECT 教员要求其他 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string others = mydb.Returnafield(mysql);
         mysql = "SELECT 家教状态 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string tutors_state = mydb.Returnafield(mysql);
         mysql = "SELECT 经办时间 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string time = mydb.Returnafield(mysql);
         mysql = "SELECT 重要备注 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string remarks = mydb.Returnafield(mysql);
         mysql = "SELECT 缴费状态 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string payment_state = mydb.Returnafield(mysql);
         mysql = "SELECT 缴费时间 FROM [Parents] WHERE 家长编号='" + parents_num + "'";
         string       payment_time = mydb.Returnafield(mysql);
         Tutors_check myform       = new Tutors_check(ID, parents_num, print_num, parents_name, phone, grade_subject, student_sex,
                                                      tutors_state, time, tutors_price, tutors_time, dadd, remarks, payment_state, payment_time);
         myform.Owner     = this;
         myform.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
         myform.Show();
     }
 }