private bool check_ct_dang_su_dung(decimal ip_id_chuc_vu)
 {
     US_GD_CONG_TAC v_us_ct = new US_GD_CONG_TAC();
     DS_GD_CONG_TAC v_ds_ct = new DS_GD_CONG_TAC();
     v_us_ct.FillDataset(v_ds_ct, "where id_vi_tri = " + ip_id_chuc_vu);
     if (v_ds_ct.Tables[0].Rows.Count == 0)
     {
         return false;
     }
     else return true;
 }
        private bool loai_ctac_cthuc_isExist(decimal ip_dc_id_nv, decimal ip_dc_id_loai_ct)
        {
            US_GD_CONG_TAC v_us = new US_GD_CONG_TAC();
            DS_GD_CONG_TAC v_ds = new DS_GD_CONG_TAC();

            v_us.FillDataset(v_ds);

            string v_str_filter = "ID_NHAN_VIEN = " + ip_dc_id_nv + "AND DA_XOA = 'N' AND ID_LOAI_CONG_TAC = " + ip_dc_id_loai_ct;
            DataRow[] v_dr = v_ds.GD_CONG_TAC.Select(v_str_filter);

            if (v_dr.Count() == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
        private decimal find_id_gd_ct(decimal ip_dc_id_nv)
        {
            US_GD_CONG_TAC v_us = new US_GD_CONG_TAC();
            DS_GD_CONG_TAC v_ds = new DS_GD_CONG_TAC();

            v_us.FillDataset(v_ds);

            string v_str_filter = "ID_NHAN_VIEN = " + ip_dc_id_nv + "AND DA_XOA = 'N'";
            DataRow[] v_dr = v_ds.GD_CONG_TAC.Select(v_str_filter);

            if (v_dr.Count() == 0)
            {
                return -1;
            }
            else
            {
                return CIPConvert.ToDecimal(v_dr.First()["ID"].ToString());
            }
        }