public static void load_data_2_cbo_lop_mon(
            decimal ip_dc_id_lop_mon
            , System.Windows.Forms.ComboBox op_cbo_lop_mon
            )
        {
            DS_DM_LOP_MON v_ds_dm_lop_mon = new DS_DM_LOP_MON();
            US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON();
            if (ip_dc_id_lop_mon == -1)
            {
                v_us_dm_lop_mon.FillDataset(v_ds_dm_lop_mon, "where TRANG_THAI_LOP_MON = 88");

                DataRow v_dr = v_ds_dm_lop_mon.DM_LOP_MON.NewRow();
                v_dr[DM_LOP_MON.ID] = -1;
                v_dr[DM_LOP_MON.MA_LOP_MON] = "--Tất cả--";
                v_dr[DM_LOP_MON.MO_TA] = "--Tất cả--";
                v_dr[DM_LOP_MON.TRANG_THAI_LOP_MON] = -1;
                v_dr[DM_LOP_MON.DON_GIA_BUOI_HOC] = 0;

                v_ds_dm_lop_mon.DM_LOP_MON.Rows.InsertAt(v_dr, 0);
            }
            else
            {
                v_us_dm_lop_mon.FillDataset(v_ds_dm_lop_mon, "where ID = " + ip_dc_id_lop_mon + " and TRANG_THAI_LOP_MON = 88");
            }
            op_cbo_lop_mon.DataSource = v_ds_dm_lop_mon.DM_LOP_MON;
            op_cbo_lop_mon.DisplayMember = DM_LOP_MON.MO_TA;
            op_cbo_lop_mon.ValueMember = DM_LOP_MON.ID;
            op_cbo_lop_mon.SelectedIndex = 0;
        }
 public void display_4_update(US.US_DM_LOP_MON ip_us_dm_lop_mon)
 {
     m_e_form_mode = DataEntryFormMode.UpdateDataState;
     m_us_dm_lop_mon = ip_us_dm_lop_mon;
     us_object_2_form();
     this.ShowDialog();
 }
        private void load_data_2_cbo_lop_mon_tu_399()
        {
            DS_DM_LOP_MON v_ds = new DS_DM_LOP_MON();
            US_DM_LOP_MON v_us = new US_DM_LOP_MON();
            v_us.FillDataset(v_ds, "where TRANG_THAI_LOP_MON = 88");

            //DataRow v_dr = v_ds.DM_LOP_MON.NewRow();
            //v_dr[DM_LOP_MON.ID] = -1;
            //v_dr[DM_LOP_MON.MA_LOP_MON] = "--Tất cả--";
            //v_dr[DM_LOP_MON.MO_TA] = "--Tất cả--";
            //v_dr[DM_LOP_MON.DON_GIA_BUOI_HOC] = "0";
            //v_ds.DM_LOP_MON.Rows.InsertAt(v_dr, 0);

            m_cbo_lop_mon.DataSource = v_ds.DM_LOP_MON;
            m_cbo_lop_mon.DisplayMember = DM_LOP_MON.MO_TA;
            m_cbo_lop_mon.ValueMember = DM_LOP_MON.ID;

            //m_cbo_lop_mon.SelectedIndex = 0;
        }
        private void load_data_2_cbo_lop_mon(decimal ip_dc_id_lop_mon, decimal ip_dc_trang_thai_hien_thi)
        {
            DS_DM_LOP_MON v_ds = new DS_DM_LOP_MON();
            US_DM_LOP_MON v_us = new US_DM_LOP_MON();
            v_us.FillDataset(v_ds);

            m_cbo_lop_mon.DataSource = v_ds.DM_LOP_MON;
            m_cbo_lop_mon.DisplayMember = DM_LOP_MON.MO_TA;
            m_cbo_lop_mon.ValueMember = DM_LOP_MON.ID;

            if(ip_dc_trang_thai_hien_thi == 0) {
                //m_cbo_lop_mon.SelectedIndex = 0;
            }
            else {
                m_cbo_lop_mon.SelectedValue = ip_dc_id_lop_mon;
            }
        }
        private void load_data_2_lbl_ten_lop(int m_loai_lop, decimal i_dc_lop_mon)
        {
            DS_DM_LOP_MON v_ds = new DS_DM_LOP_MON();
            US_DM_LOP_MON v_us = new US_DM_LOP_MON();

            DataRow v_dr;
            if (m_loai_lop == 0)
            {
                v_us.FillDataset(v_ds, "WHERE ID = " + CIPConvert.ToDecimal(m_cbo_lop_mon_cu.SelectedValue));
                v_dr = v_ds.Tables[0].Rows[0];
                US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON(CIPConvert.ToDecimal(v_dr[DM_LOP_MON.ID]));
                m_lbl_ten_lop_cu.Text = v_us_dm_lop_mon.strMO_TA;
                m_lbl_ten_lop_cu.Visible = true;
            }
            else
            {
                v_us.FillDataset(v_ds, "WHERE ID = " + CIPConvert.ToDecimal(m_cbo_lop_mon_moi.SelectedValue));
                v_dr = v_ds.Tables[0].Rows[0];
                US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON(CIPConvert.ToDecimal(v_dr[DM_LOP_MON.ID]));
                m_lbl_ten_lop_moi.Text = v_us_dm_lop_mon.strMO_TA;
                m_lbl_ten_lop_moi.Visible = true;
            }
        }
        private void load_data_2_cbo_lop_mon_moi()
        {
            DS_DM_LOP_MON v_ds_dm_lop_mon = new DS_DM_LOP_MON();
            US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON();
            v_us_dm_lop_mon.FillDataset(v_ds_dm_lop_mon, "where TRANG_THAI_LOP_MON = 88");

            DataRow v_dr = v_ds_dm_lop_mon.DM_LOP_MON.NewRow();
            v_dr[DM_LOP_MON.ID] = -1;
            v_dr[DM_LOP_MON.MA_LOP_MON] = "--Tất cả--";
            v_dr[DM_LOP_MON.MO_TA] = "--Tất cả--";
            v_dr[DM_LOP_MON.DON_GIA_BUOI_HOC] = 0;
            v_dr[DM_LOP_MON.TRANG_THAI_LOP_MON] = -1;

            v_ds_dm_lop_mon.DM_LOP_MON.Rows.InsertAt(v_dr, 0);

            m_cbo_lop_mon_moi.DataSource = v_ds_dm_lop_mon.DM_LOP_MON;
            m_cbo_lop_mon_moi.DisplayMember = DM_LOP_MON.MA_LOP_MON;
            m_cbo_lop_mon_moi.ValueMember = DM_LOP_MON.ID;

            m_cbo_lop_mon_moi.SelectedIndex = 0;
        }
        private void cho_lop_cu_nghi_hoat_dong()
        {
            US_GD_HOC v_us = new US_GD_HOC();
            DS_GD_HOC v_ds = new DS_GD_HOC();
            v_us.FillDataset(v_ds, "WHERE ID_LOP_MON = " + CIPConvert.ToDecimal(m_cbo_lop_mon_cu.SelectedValue) + " and TRANG_THAI_YN = 'Y'");
            for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
            {
                DataRow v_dr = v_ds.Tables[0].Rows[i];
                US_GD_HOC v_us_gd_hoc = new US_GD_HOC(CIPConvert.ToDecimal(v_dr[GD_HOC.ID]));
                v_us_gd_hoc.BeginTransaction();
                v_us_gd_hoc.strTRANG_THAI_YN = "N";
                v_us_gd_hoc.datNGAY_KET_THUC = DateTime.Now.Date;
                v_us_gd_hoc.Update();
                v_us_gd_hoc.CommitTransaction();
            }

            US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON(CIPConvert.ToDecimal(m_cbo_lop_mon_cu.SelectedValue));
            v_us_dm_lop_mon.BeginTransaction();
            v_us_dm_lop_mon.dcTRANG_THAI_LOP_MON = 89;
            v_us_dm_lop_mon.Update();
            v_us_dm_lop_mon.CommitTransaction();
        }