private void Tutors_management_Load(object sender, EventArgs e)
        {
            CmbClass cmbc = new CmbClass();

            cmbc.cboDataBind(cbo_principal, "SELECT distinct 姓名 FROM [Workers]", "Workers", "姓名");
            cbo_principal.SelectedItem = null;
            txt_printnum.Text          = print_num1;
            string mysql = string.Format("SELECT distinct 教员编号 FROM [Parents-Tutors] WHERE 家长编号='{0}' " +
                                         "AND 打印编号='{1}'", parent_num1, print_num1);

            cmbc.cboDataBind(cbo_tutors_num, mysql, "Parents-Tutors", "教员编号");

            /*     if (state1 != null)
             *   {
             *       string[] state = state1.Split(' ');
             *       string tempstate = state.Last();
             *       cbo_state.SelectedItem = tempstate;
             *   }*/
            flag2 = true;
            if (tutors_num1 != "")
            {
                cbo_tutors_num.Text = tutors_num1;
            }

            /*    if (tutors_name1 != "")
            *       txt_tutors_name.Text = tutors_name1;
            *
            *
            *       if (remarks1 != "")
            *       txt_remark.Text = remarks1;*/
            /*  mysql = string.Format("SELECT * FROM [Parents-Tutors] WHERE 打印编号='{0}' AND 教员编号='{1}'", print_num1, tutors_num1);
             * int i = mydb.Rownum(mysql);
             * if (i > 0)
             *    flag = true;//记录存在*/
        }
Exemple #2
0
        private void Payment_Load(object sender, EventArgs e)
        {
            txt_parent_num.Text    = parent_num1;
            txt_print_num.Text     = print_num1;
            cbo_state.SelectedItem = "已缴";
            cbo_state.Enabled      = false;
            CmbClass cmbc = new CmbClass();

            cmbc.cboDataBind(cbo_principal, "SELECT distinct 姓名 FROM [Workers]", "Workers", "姓名");
            cbo_principal.SelectedItem = null;
        }
Exemple #3
0
        private void Tutors_Add_Load(object sender, EventArgs e)
        {
            CmbClass cmbc = new CmbClass();

            cmbc.cboDataBind(cbo_reception, "SELECT distinct 姓名 FROM [Workers]", "Workers", "姓名");
            cbo_reception.SelectedItem   = null;
            cbo_tutor_state.SelectedItem = "接入";
            string mysql       = "SELECT MAX(家长编号) FROM [parents]";
            int    parents_num = int.Parse(mydb.Returnafield(mysql));

            parents_num++;
            txt_parent_num.Text = parents_num.ToString();
            mysql = "SELECT MAX(打印编号) FROM [parents]";
            int print_num = int.Parse(mydb.Returnafield(mysql));

            print_num++;
            txt_print_num.Text = print_num.ToString();
        }
        private void Tutors_revise_Load(object sender, EventArgs e)
        {
            CmbClass cmbc = new CmbClass();

            cmbc.cboDataBind(cbo_reception, "SELECT distinct 姓名 FROM [Workers]", "Workers", "姓名");
            CmbDataGridview cmbd = new CmbDataGridview();
            CCTRS           ctr  = new CCTRS();

            ctr.ColorDataGridView(dgv_tutors);
            string mystr = "SELECT 教员编号,教员姓名,经办状态,经办时间,经办人,处理备注 FROM [Parents-Tutors] WHERE " +
                           "打印编号='" + print_num1 + "' ORDER BY (SELECT right(经办时间,10)) DESC";

            cmbd.bind(dgv_tutors, mystr, "Parents-Tutors");
            dgv_tutors.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.ColumnHeader;
            dgv_tutors.Columns[5].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            txt_parent_num.Text = parent_num1;
            txt_print_num.Text  = print_num1;
            mystr = "SELECT 接入时间 FROM [Parents] WHERE ID='" + ID1 + "'";
            dt_recepiton_time.Text = mydb.Returnafield(mystr);
            txt_parent_name.Text   = parent_name1;
            txt_phone.Text         = phone1;
            mystr                  = "SELECT 家教地址简单 FROM [Parents] WHERE ID='" + ID1 + "'";
            txt_sadd.Text          = mydb.Returnafield(mystr);
            txt_dadd.Text          = dadd1;
            txt_grade_subject.Text = grade_subject1;
            if (student_sex1 == "男")
            {
                rdo_man.Checked = true;
            }
            if (student_sex1 == "女")
            {
                rdo_woman.Checked = true;
            }
            txt_tutor_price.Text = tutors_price1;
            txt_tutor_time.Text  = tutors_time1;
            mystr = "SELECT 接待人 FROM [Parents] WHERE ID='" + ID1 + "'";
            cbo_reception.Text = mydb.Returnafield(mystr);
            mystr = "SELECT 教员要求性别 FROM [Parents] WHERE ID='" + ID1 + "'";
            cbo_sex.SelectedItem = mydb.Returnafield(mystr);
            mystr                   = "SELECT 教员要求地域 FROM [Parents] WHERE ID='" + ID1 + "'";
            txt_place.Text          = mydb.Returnafield(mystr);
            mystr                   = "SELECT 教员要求年级 FROM [Parents] WHERE ID='" + ID1 + "'";
            txt_grade.Text          = mydb.Returnafield(mystr);
            mystr                   = "SELECT 教员要求专业 FROM [Parents] WHERE ID='" + ID1 + "'";
            txt_subject.Text        = mydb.Returnafield(mystr);
            mystr                   = "SELECT 教员要求其他 FROM [Parents] WHERE ID='" + ID1 + "'";
            txt_other_requests.Text = mydb.Returnafield(mystr);
            //       string[] tutors_state = tutors_state1.Split(' ');
            //     cbo_tutor_state.SelectedItem = tutors_state.Last();
            cbo_tutor_state.SelectedItem   = tutors_state1;
            txt_important_remarks.Text     = important_mark1;
            cbo_payment_state.SelectedItem = payment_state1;
            dt_payment_time.Text           = payment_time1;
            if (cbo_payment_state.SelectedItem.ToString() == "待缴" || cbo_payment_state.SelectedItem.ToString() == "无需缴纳")
            {
                dt_payment_time.Enabled = false;
            }
            if (cbo_payment_state.SelectedItem.ToString() == "已缴")
            {
                dt_payment_time.Enabled = true;
            }
            flag = true;
        }