Esempio n. 1
0
        private void frmThuhoi_Load(object sender, System.EventArgs e)
        {
            user = d.user; xxx = user + s_mmyy;
            f_capnhat_db(s_mmyy);
            //
            bNguoiduyet_nguoithuhoi = d.bNguoiduyet_nguoithuhoi(i_nhom);
            bIntheocstt             = d.bIntheocstt(i_nhom);
            if (bIntheocstt && i_loai == 2)
            {
                label1.Text = "Tủ trực :";
            }
            if (bBuhaophi)
            {
                s_noidung = "PHIEU HAO PHI";
            }
            else
            {
                switch (i_loai)
                {
                case 1: s_noidung = "PHIEU LINH";
                    break;

                case 2: s_noidung = "PHIEU TU TRUC";
                    break;

                case 3: s_noidung = "PHIEU HOAN TRA";
                    break;

                default: s_noidung = "PHIEU HAO PHI";
                    break;
                }
            }
            bKiemtra            = d.bKiemtra_phat_thuhoi(i_nhom);
            phieu.DisplayMember = "TEN";
            phieu.ValueMember   = "ID";
            phieu.DataSource    = dtphieu;
            if (i_phieu != -1)
            {
                phieu.SelectedValue = i_phieu.ToString();
            }
            else
            {
                phieu.SelectedIndex = 0;
            }

            makp.DisplayMember = "TEN";
            makp.ValueMember   = "ID";
            makp.DataSource    = dtkp;
            if (i_makp != -1)
            {
                makp.SelectedValue = i_makp.ToString();
            }
            else
            {
                makp.SelectedIndex = 0;
            }
            b1kho = d.b1kho(s_makho);
            load_phieu();
        }