public bool KiemTraNhanVienCoCongTacChua(decimal ip_dc_id_nhan_vien, decimal ip_dc_id_don_vi)
        {
            CStoredProc v_cstore = new CStoredProc("pr_NS_nhan_vien_thuoc_phong_ban_Check");
            v_cstore.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);
            v_cstore.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi);
            SqlParameter v_para = v_cstore.addNVarcharOutputParam("@op_str_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_para.Value.ToString() == "Y" ? true : false;
        }
        public bool KiemTraThoiGianHeSoLNSHopLeForInsert(decimal ip_dc_id_nhan_vien, DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay)
        {
            CStoredProc v_cstore = new CStoredProc("pr_HD_du_lieu_hs_lns_hop_le_CheckInsert");
            v_cstore.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);
            v_cstore.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);

            SqlParameter v_yn = v_cstore.addNVarcharOutputParam("@op_str_hop_le_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_yn.Value.ToString() == "Y" ? true : false;
        }
 public bool deleteAllDataOfUNC(decimal ip_dc_id_unc)
 {
     CStoredProc v_sp = new CStoredProc("pr_DM_GIAI_NGAN_deleteAllDataOfUNC");
     v_sp.addDecimalInputParam("@ip_dc_id_unc", ip_dc_id_unc);
     try
     {
         v_sp.ExecuteCommand(this);
         return true;
     }
     catch (Exception)
     {
         return false;
     }
     return false;
 }
        public void thay_doi_trang_thai_lao_dong(decimal ip_dc_id_nhan_vien
            , decimal ip_dc_id_trang_thai_chuyen
            , DateTime ip_dat_ngay_lap
            , string ip_str_nguoi_lap)
        {
            CStoredProc v_sp = new CStoredProc("pr_thay_doi_trang_thai_lao_dong");
            v_sp.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);
            v_sp.addDecimalInputParam("@ip_dc_id_trang_thai_chuyen", ip_dc_id_trang_thai_chuyen);
            v_sp.addDatetimeInputParam("@ip_dat_ngay_lap", ip_dat_ngay_lap);
            v_sp.addNVarcharInputParam("@ip_str_nguoi_lap", ip_str_nguoi_lap);

            v_sp.ExecuteCommand(this);
        }
        public void get_don_gia_dinh_muc_and_so_luong_thong_ke(decimal ip_id_trung_tam, decimal ip_id_loai_dinh_muc
            , DateTime ip_from_date, DateTime ip_to_date
            , ref decimal op_don_gia_dinh_muc, ref decimal op_so_luong_thong_ke)
        {
            CStoredProc v_proc = new CStoredProc("pr_get_don_gia_dinh_muc_and_so_luong_thong_ke");

            v_proc.addDecimalInputParam("@ID_TRUNG_TAM", ip_id_trung_tam);
            v_proc.addDecimalInputParam("@ID_LOAI_DINH_MUC", ip_id_loai_dinh_muc);
            v_proc.addDatetimeInputParam("@FROM_DATE", ip_from_date);
            v_proc.addDatetimeInputParam("@TO_DATE", ip_to_date);
            SqlParameter v_obj_don_gia_dinh_muc = v_proc.addDecimalOutputParam("@DON_GIA_DINH_MUC", -1);
            SqlParameter v_obj_so_luong_thong_ke = v_proc.addDecimalOutputParam("@SO_LUONG_THONG_KE", -1);

            v_proc.ExecuteCommand(this);

            if(v_obj_don_gia_dinh_muc.Value.ToString() != "0" && v_obj_don_gia_dinh_muc.Value.ToString() != "") {
            op_don_gia_dinh_muc = CIPConvert.ToDecimal(v_obj_don_gia_dinh_muc.Value);
            }
            if(v_obj_so_luong_thong_ke.Value.ToString() != "0" && v_obj_so_luong_thong_ke.Value.ToString() != "") {
            op_so_luong_thong_ke = CIPConvert.ToDecimal(v_obj_so_luong_thong_ke.Value);
            }
        }
 public void DeleteAllQuyenOfGroupUser(decimal i_dc_group_user_id)
 {
     CStoredProc v_obj = new CStoredProc("pr_HT_PHAN_QUYEN_HE_THONG_Delele_All_Quyen_Of_group_user");
     v_obj.addDecimalInputParam("@ip_dc_group_user_id", i_dc_group_user_id);
     v_obj.ExecuteCommand(this);
 }
 public void Insert_nhom_nguoi_dung()
 {
     CStoredProc v_cstore = new CStoredProc("pr_HT_USER_GROUP_Insert");
     v_cstore.addNVarcharInputParam("@USER_GROUP_NAME", this.strUSER_GROUP_NAME);
     v_cstore.addNVarcharInputParam("@DESCRIPTION", this.strDESCRIPTION);
     v_cstore.ExecuteCommand(this);
 }
 public void update_noi_dung_chi_from_giao_kh_sang_giao_von(
     DateTime ip_dat_tu_ngay
     , DateTime ip_dat_den_ngay
     , decimal ip_dc_id_don_vi
     , decimal ip_dc_id_quyet_dinh)
 {
     CStoredProc v_sp = new CStoredProc("pr_gd_giao_von_insert_from_gd_giao_kh");
     v_sp.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
     v_sp.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);
     v_sp.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi);
     v_sp.addDecimalInputParam("@ip_dc_id_quyet_dinh", ip_dc_id_quyet_dinh);
     v_sp.ExecuteCommand(this);
 }
 public void gen_ma_nhan_vien(ref string v_str_op_ma_nhan_vien)
 {
     CStoredProc v_obj_csp = new CStoredProc("pr_gen_ma_nhan_vien");
     SqlParameter v_op_str = v_obj_csp.addNVarcharOutputParam("@op_ma_nhan_vien", "");
     v_obj_csp.ExecuteCommand(this);
     v_str_op_ma_nhan_vien = v_op_str.Value.ToString();
 }
        public bool check_diem_danh_hs(
            decimal ip_dc_id_hoc_sinh
            , decimal ip_dc_id_lop_mon
            , decimal ip_dc_id_nguoi_diem_danh
            , DateTime ip_dat_tai_ngay
            , ref decimal op_dc_id_gd_diem_danh)
        {
            DS_GD_DIEM_DANH op_ds_diem_danh = new DS_GD_DIEM_DANH();
            CStoredProc v_obj_spr = new CStoredProc("pr_kiem_tra_hoc_sinh_diem_danh");
            v_obj_spr.addDecimalInputParam("@ip_dc_id_hoc_sinh", ip_dc_id_hoc_sinh);
            v_obj_spr.addDecimalInputParam("@ip_dc_id_lop_mon", ip_dc_id_lop_mon);
            v_obj_spr.addDecimalInputParam("@ip_dc_id_nguoi_diem_danh", ip_dc_id_nguoi_diem_danh);
            v_obj_spr.addDatetimeInputParam("@ip_dat_tai_ngay", ip_dat_tai_ngay);
            SqlParameter v_id_gd_diem_danh = v_obj_spr.addDecimalOutputParam("@op_dc_id_gd_diem_danh", 0);

            v_obj_spr.ExecuteCommand(this);

            op_dc_id_gd_diem_danh = CIPConvert.ToDecimal(v_id_gd_diem_danh.Value);
            if (op_dc_id_gd_diem_danh == -1)
            {
                return false;
            }
            else
                return true;
        }
        public void Find_ID_GD_DIEM_DANH(decimal ip_dc_id_lop_mon, DateTime ip_dat_tai_ngay, ref decimal op_dc_id_gd_diem_danh)
        {
            CStoredProc v_obj = new CStoredProc("pr_get_id_diem_danh_by_id_lop_mon_va_ngay_diem_danh");

            v_obj.addDecimalInputParam("@ip_dc_id_lop_mon", ip_dc_id_lop_mon);
            v_obj.addDatetimeInputParam("@ip_dat_tai_ngay", ip_dat_tai_ngay);
            SqlParameter v_id_gd_diem_danh = v_obj.addDecimalOutputParam("@op_dc_id_gd_diem_danh", 0);
            v_obj.ExecuteCommand(this);
            op_dc_id_gd_diem_danh = CIPConvert.ToDecimal(v_id_gd_diem_danh.Value);
        }
        public void LockBangLuongThang(decimal ip_dc_thang, decimal ip_dc_nam, string ip_str_nguoi_chot)
        {
            CStoredProc v_pr = new CStoredProc("pr_TL_bang_luong_LOCK");
            v_pr.addDecimalInputParam("@ip_dc_thang", ip_dc_thang);
            v_pr.addDecimalInputParam("@ip_dc_nam", ip_dc_nam);
            v_pr.addNVarcharInputParam("@ip_str_nguoi_chot", ip_str_nguoi_chot);

            v_pr.ExecuteCommand(this);
        }
        public bool IsLockBangLuong(decimal ip_dc_thang, decimal ip_dc_nam)
        {
            CStoredProc v_pr = new CStoredProc("pr_TL_infor_lock_bang_luong_Get");
            v_pr.addDecimalInputParam("@ip_dc_thang", ip_dc_thang);
            v_pr.addDecimalInputParam("@ip_dc_nam", ip_dc_nam);
            SqlParameter v_para = v_pr.addNVarcharOutputParam("@op_str_lock_yn", "");

            v_pr.ExecuteCommand(this);
            return v_para.Value.ToString() == "Y" ? true : false;
        }
        public void cap_nhat_trang_thai_cau_hoi()
        {
            CStoredProc v_cstore = new CStoredProc("pr_V_GD_XU_LY_NOI_BO_Update_TrangThaiCauHoi");

            v_cstore.addDecimalInputParam("@ID", this.dcID);
            v_cstore.addDecimalInputParam("@ID_TRANG_THAI_CAU_HOI", this.dcID_TRANG_THAI_CAU_HOI);

            v_cstore.ExecuteCommand(this);
        }
 public void lap_hop_dong_moi_cho_nhan_vien(decimal ID_NHAN_VIEN
     , decimal ID_LOAI_HOP_DONG
     , string MA_HOP_DONG
     , DateTime NGAY_BAT_DAU
     , DateTime NGAY_KET_THUC
     , DateTime NGAY_KY_HOP_DONG
     , DateTime NGAY_LAP
     , string NGUOI_LAP
     , string DA_XOA
     , decimal ID_CD_LCD
     , decimal ID_MUC_LCD
     , decimal ID_CD_LNS
     , decimal ID_MUC_LNS
     , ref string op_str_mess)
 {
     CStoredProc v_sp = new CStoredProc("pr_lap_hop_dong_moi_cho_nhan_vien");
     v_sp.addDecimalInputParam("@ID_NHAN_VIEN", ID_NHAN_VIEN);
     v_sp.addDecimalInputParam("@ID_LOAI_HOP_DONG", ID_LOAI_HOP_DONG);
     v_sp.addNVarcharInputParam("@MA_HOP_DONG", MA_HOP_DONG);
     v_sp.addDatetimeInputParam("@NGAY_BAT_DAU", NGAY_BAT_DAU);
     v_sp.addDatetimeInputParam("@NGAY_KET_THUC", NGAY_KET_THUC);
     v_sp.addDatetimeInputParam("@NGAY_KY_HOP_DONG", NGAY_KY_HOP_DONG);
     v_sp.addDatetimeInputParam("@NGAY_LAP", NGAY_LAP);
     v_sp.addNVarcharInputParam("@NGUOI_LAP", NGUOI_LAP);
     v_sp.addNVarcharInputParam("@DA_XOA", DA_XOA);
     v_sp.addDecimalInputParam("@ID_CD_LCD", ID_CD_LCD);
     v_sp.addDecimalInputParam("@ID_MUC_LCD", ID_MUC_LCD);
     v_sp.addDecimalInputParam("@ID_CD_LNS", ID_CD_LNS);
     v_sp.addDecimalInputParam("@ID_MUC_LNS", ID_MUC_LNS);
     SqlParameter v_op_str = v_sp.addNVarcharOutputParam("@OP_STR_MESSAGE", op_str_mess);
     v_sp.ExecuteCommand(this);
     op_str_mess = v_op_str.Value.ToString();
 }
        public void FillDatasetByID_AUCTION(decimal i_id_auction , DS_KET_QUA_TONG_HOP i_ds, 
										 ref decimal i_dc_so_luong_co_phan_nguoi_nuoc_ngoai_duoc_mua
										,ref decimal i_dc_menh_gia_co_phan
										,ref decimal i_dc_gia_khoi_diem
										,ref decimal i_dc_tong_so_nha_dau_tu_phap_nhan
										,ref decimal i_dc_tong_so_nha_dau_tu_ca_nhan
										,ref decimal i_dc_khoi_luong_dat_cao_nhat
										,ref decimal i_dc_khoi_luong_dat_thap_nhat
										,ref decimal i_dc_gia_dat_cao_nhat
										,ref decimal i_dc_gia_dat_thap_nhat
										,ref decimal i_dc_so_co_phan_trung_cua_nguoi_nuoc_ngoai)
        {
            CStoredProc v_pro = new CStoredProc ( "pr_get_ket_qua_tong_hop" ) ;
            v_pro.addDecimalInputParam ( "@id_auction" , i_id_auction ) ;
            SqlParameter v_obj_para_sl_co_phan_nuoc_ngoai
            = v_pro.addDecimalOutputParam( "@SoLuongCoPhanNguoiNuocNgoaiDuocMua", 0) ;
            SqlParameter v_obj_para_menh_gia_co_phan
            = v_pro.addDecimalOutputParam( "@MenhGiaCoPhan", 0);
            SqlParameter v_obj_para_gia_khoi_diem
            = v_pro.addDecimalOutputParam("@GiaKhoiDiem", 0);
            SqlParameter v_obj_para_tong_so_nha_dau_tu_phap_nhan
            = v_pro.addDecimalOutputParam("@TongSoNhaDauTuPhapNhan", 0);
            SqlParameter v_obj_para_tong_so_nha_dau_tu_ca_nhan
            = v_pro.addDecimalOutputParam("@TongSoNhaDauTuCaNhan", 0);
            SqlParameter v_obj_para_khoi_luong_dat_cao_nhat
            = v_pro.addDecimalOutputParam("@KhoiLuongDatCaoNhat", 0);
            SqlParameter v_obj_para_khoi_luong_dat_thap_nhat
            = v_pro.addDecimalOutputParam("@KhoiLuongDatThapNhat", 0);
            SqlParameter v_obj_para_gia_dat_cao_nhat
            = v_pro.addDecimalOutputParam("@GiaDatCaoNhat",0);
            SqlParameter v_obj_para_gia_dat_thap_nhat
            = v_pro.addDecimalOutputParam("@GiaDatThapNhat",0);
            SqlParameter v_obj_para_so_co_phan_trung_cua_nguoi_nuoc_ngoai
            = v_pro.addDecimalOutputParam("@SoCoPhanTrungCuaNguoiNuocNgoai",0);

            v_pro.ExecuteCommand (this) ;
            v_pro.fillDataSetByCommand(this, i_ds);
            i_dc_so_luong_co_phan_nguoi_nuoc_ngoai_duoc_mua
            = CIPConvert.ToDecimal(v_obj_para_sl_co_phan_nuoc_ngoai.Value);
            i_dc_menh_gia_co_phan = CIPConvert.ToDecimal(v_obj_para_menh_gia_co_phan.Value);
            i_dc_gia_khoi_diem = CIPConvert.ToDecimal(v_obj_para_gia_khoi_diem.Value);
            i_dc_tong_so_nha_dau_tu_phap_nhan =
            CIPConvert.ToDecimal(v_obj_para_tong_so_nha_dau_tu_phap_nhan.Value);
            i_dc_tong_so_nha_dau_tu_ca_nhan =
            CIPConvert.ToDecimal(v_obj_para_tong_so_nha_dau_tu_ca_nhan.Value );
            i_dc_khoi_luong_dat_cao_nhat =
            CIPConvert.ToDecimal(v_obj_para_khoi_luong_dat_cao_nhat.Value );
            i_dc_khoi_luong_dat_thap_nhat =
            CIPConvert.ToDecimal(v_obj_para_khoi_luong_dat_thap_nhat.Value );
            i_dc_gia_dat_cao_nhat = CIPConvert.ToDecimal(v_obj_para_gia_dat_cao_nhat.Value );
            i_dc_gia_dat_thap_nhat = CIPConvert.ToDecimal(v_obj_para_gia_dat_thap_nhat.Value );
            i_dc_so_co_phan_trung_cua_nguoi_nuoc_ngoai
            = CIPConvert.ToDecimal(v_obj_para_so_co_phan_trung_cua_nguoi_nuoc_ngoai.Value );
        }
        public void LayMaMucLNSCuaHopDong(decimal ip_dc_id_hop_dong_con_hieu_luc, out decimal op_dc_he_so, out string op_str_ma, out string op_str_muc)
        {
            CStoredProc v_sp = new CStoredProc("pr_HD_ma_muc_lns_Get");
            v_sp.addDecimalInputParam("@ip_dc_id_hop_dong_con_hieu_luc", @ip_dc_id_hop_dong_con_hieu_luc);

            SqlParameter v_p_he_so = v_sp.addDecimalOutputParam("@op_dc_he_so", (decimal)1.123);
            v_p_he_so.Precision = 6;
            v_p_he_so.Scale = 2;
            SqlParameter v_p_muc = v_sp.addNVarcharOutputParam("@op_str_muc_lns", "");
            SqlParameter v_p_ma = v_sp.addNVarcharOutputParam("@op_str_ma_lns", "");

            v_sp.ExecuteCommand(this);
            op_dc_he_so = Convert.ToDecimal(v_p_he_so.Value);
            op_str_ma = v_p_ma.Value.ToString();
            op_str_muc = v_p_muc.Value.ToString();
        }
        public void Find_id_gd_phieu_thu(decimal ip_dc_id_lop_mon, DateTime ip_dat_ngay_thu, ref decimal op_dc_id_gd_phieu_thu)
        {
            CStoredProc v_obj = new CStoredProc("pr_get_id_gd_hoc_by_id_lop_ngay_thu");

            v_obj.addDecimalInputParam("@ip_dc_id_lop_mon", ip_dc_id_lop_mon);
            v_obj.addDatetimeInputParam("@ip_dat_ngay_thu", ip_dat_ngay_thu);
            SqlParameter v_id_gd_phieu_thu = v_obj.addDecimalOutputParam("@op_dc_id_gd_phieu_thu", 0);
            v_obj.ExecuteCommand(this);
            op_dc_id_gd_phieu_thu = CIPConvert.ToDecimal(v_id_gd_phieu_thu.Value);
        }
 //public decimal getTongTienKH(
 //    decimal ip_dc_id_don_vi
 //    , DateTime ip_dat_tu_ngay
 //    , DateTime ip_dat_den_ngay
 //    , string ip_str_is_nguon_ns_yn
 //    , decimal ip_dc_id_loai_du_an)
 //{
 //    decimal op_dc_tong_tien = 0;
 //    DS_GD_GIAO_KH v_ds = new DS_GD_GIAO_KH();
 //    v_ds.Clear();
 //    v_ds.EnforceConstraints = false;
 //    CStoredProc v_sp = new CStoredProc("pr_GD_GIAO_KH_tong_so_tien");
 //    v_sp.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi);
 //    v_sp.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
 //    v_sp.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);
 //    v_sp.addNVarcharInputParam("@ip_str_is_nguon_ns_yn", ip_str_is_nguon_ns_yn);
 //    v_sp.addDecimalInputParam("@ip_dc_id_loai_du_an", ip_dc_id_loai_du_an);
 //    v_sp.fillDataSetByCommand(this, v_ds);
 //    for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
 //    {
 //        if (v_ds.Tables[0].Rows[i][GD_GIAO_KH.SO_TIEN_NS] != null && v_ds.Tables[0].Rows[i][GD_GIAO_KH.SO_TIEN_QUY_BT] != null)
 //        {
 //            op_dc_tong_tien += CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i][GD_GIAO_KH.SO_TIEN_NS]) + CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i][GD_GIAO_KH.SO_TIEN_QUY_BT]);
 //        }
 //    }
 //    return op_dc_tong_tien;
 //}
 public bool update_ten_du_an_giao_kh_to_giao_von_va_unc(
     decimal ip_dc_id_don_vi
     , decimal ip_dc_id_loai_nhiem_vu
     , decimal ip_dc_id_du_an_cong_trinh
     , string ip_str_ten_du_an_cu
     , string ip_str_ten_du_an_moi
     , DateTime ip_dat_tu_ngay
     , DateTime ip_dat_den_ngay)
 {
     CStoredProc v_sp = new CStoredProc("pr_update_ten_du_an_from_gd_giao_kh");
     v_sp.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi);
     v_sp.addDecimalInputParam("@ip_dc_id_loai_nhiem_vu", ip_dc_id_loai_nhiem_vu);
     v_sp.addDecimalInputParam("@ip_dc_id_du_an_cong_trinh", ip_dc_id_du_an_cong_trinh);
     v_sp.addNVarcharInputParam("@ip_str_ten_du_an_cu", ip_str_ten_du_an_cu);
     v_sp.addNVarcharInputParam("@ip_str_ten_du_an_moi", ip_str_ten_du_an_moi);
     v_sp.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
     v_sp.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);
     try
     {
         v_sp.ExecuteCommand(this);
     }
     catch (Exception)
     {
         return false;
     }
     return true;
 }
示例#20
0
 public void check_hoc_sinh_lm(decimal ip_dc_id_hoc_sinh, decimal ip_dc_id_lop_mon, ref string op_ket_qua_yn)
 {
     CStoredProc v_obj_spr = new CStoredProc("f315_check_hs_trong_lm");
     v_obj_spr.addDecimalInputParam("@ip_dc_id_hoc_sinh", ip_dc_id_hoc_sinh);
     v_obj_spr.addDecimalInputParam("@ip_dc_id_lop_mon", ip_dc_id_lop_mon);
     SqlParameter v_op_ket_qua_yn = v_obj_spr.addNVarcharOutputParam("@op_ket_qua_yn", op_ket_qua_yn);
     v_obj_spr.ExecuteCommand(this);
     op_ket_qua_yn = v_op_ket_qua_yn.Value.ToString();
 }
        public decimal get_id_trang_thai_lao_dong(decimal ip_dc_id_nhan_vien)
        {
            CStoredProc v_sp = new CStoredProc("pr_get_id_trang_thai_lao_dong_hien_tai");
            v_sp.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);

            SqlParameter v_para = v_sp.addDecimalOutputParam("@op_dc_id_trang_thai_hien_tai", 0);
            v_sp.ExecuteCommand(this);

            return CIPConvert.ToDecimal(v_para.Value.ToString());
        }
示例#22
0
        public void Find_ID_GD_HOC(decimal ip_dc_id_lop_mon, decimal ip_dc_id_hoc_sinh, ref decimal op_dc_id_gd_hoc)
        {
            CStoredProc v_obj = new CStoredProc("pr_get_id_gd_hoc_by_id_hoc_sinh_id_lop_mon");

            v_obj.addDecimalInputParam("@ip_dc_id_lop_mon", ip_dc_id_lop_mon);
            v_obj.addDecimalInputParam("@ip_dc_id_hoc_sinh", ip_dc_id_hoc_sinh);
            SqlParameter v_id_gd_hoc = v_obj.addDecimalOutputParam("@op_dc_id_gd_hoc", 0);
            v_obj.ExecuteCommand(this);
            op_dc_id_gd_hoc = CIPConvert.ToDecimal(v_id_gd_hoc.Value);
        }
        public void get_co_so_dinh_muc_ap_dung_tu_ngay(decimal ip_id_trung_tam, decimal ip_id_loai_dinh_muc
            , DateTime ip_from_date, DateTime ip_to_date
            , ref decimal op_id_co_so_dinh_muc, ref DateTime op_ap_dung_tu_ngay
            , ref string op_ten_co_so_dinh_muc)
        {
            CStoredProc v_proc = new CStoredProc("pr_get_co_so_dinh_muc_ap_dung_tu_ngay");

            v_proc.addDecimalInputParam("@ID_TRUNG_TAM", ip_id_trung_tam);
            v_proc.addDecimalInputParam("@ID_LOAI_DINH_MUC", ip_id_loai_dinh_muc);
            v_proc.addDatetimeInputParam("@FROM_DATE", ip_from_date);
            v_proc.addDatetimeInputParam("@TO_DATE", ip_to_date);

            SqlParameter v_obj_id_co_so_dinh_muc = v_proc.addDecimalOutputParam("@ID_CO_SO_DINH_MUC", -1);
            SqlParameter v_obj_ten_co_so_dinh_muc = v_proc.addNVarcharOutputParam("@TEN_CO_SO_DINH_MUC", -1);
            SqlParameter v_obj_ap_dung_tu_ngay = v_proc.addDatetimeOutputParam("@AP_DUNG_TU_NGAY", -1);

            v_proc.ExecuteCommand(this);

            op_id_co_so_dinh_muc = CIPConvert.ToDecimal(v_obj_id_co_so_dinh_muc.Value);
            string temp = v_obj_ap_dung_tu_ngay.Value.ToString();
            if(temp != "") {
            temp = temp.Substring(0, temp.IndexOf(" "));
            op_ap_dung_tu_ngay = CIPConvert.ToDatetime(temp);
            }
            if(v_obj_ten_co_so_dinh_muc.Value.ToString() != "") {
            op_ten_co_so_dinh_muc = CIPConvert.ToStr(v_obj_ten_co_so_dinh_muc.Value);
            }
        }
 public void DeletePhieuThuVaChiTiet(decimal ip_dc_id_phieu_thu)
 {
     CStoredProc v_csp = new CStoredProc("pr_V_RPT_BAO_CAO_DANH_SACH_PHIEU_THU_Delete");
     v_csp.addDecimalInputParam("@ip_dc_id_phieu_thu", ip_dc_id_phieu_thu);
     v_csp.ExecuteCommand(this);
 }
 public void KetThucLuongNangSuatNhanVien(decimal ip_dc_id_nhan_vien, DateTime ip_dat_ngay_ket_thuc)
 {
     CStoredProc v_cs = new CStoredProc("pr_HD_cap_nhat_ngay_ket_thuc_luong_nang_suat");
     v_cs.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien);
     v_cs.addDatetimeInputParam("@ip_dat_ngay_ket_thuc", ip_dat_ngay_ket_thuc);
     v_cs.ExecuteCommand(this);
 }
        public string SelectMaxSoPhieu(decimal ip_dc_id_loai_phieu_thu, int ip_int_thang)
        {
            CStoredProc v_proc = new CStoredProc("pr_find_max_so_phieu_trong_thang");
            v_proc.addDecimalInputParam("@ip_dc_id_loai_phieu", ip_dc_id_loai_phieu_thu);
            v_proc.addDecimalInputParam("@ip_int_thang", ip_int_thang);
            SqlParameter v_para = v_proc.addNVarcharOutputParam("@op_max_so_phieu", "");

            v_proc.ExecuteCommand(this);

            decimal v_temp = CIPConvert.ToDecimal(v_para.Value)+1;
            string v_cut_1_chu_so = v_temp.ToString().Substring(0, 1);
            if(CIPConvert.ToDecimal(v_cut_1_chu_so) < 10 && CIPConvert.ToDecimal(v_cut_1_chu_so) > 1) {

            return "0" + v_temp.ToString();
            }
            else if(CIPConvert.ToDecimal(v_cut_1_chu_so) == 1) {
            if(v_temp.ToString().Length < 5 ) {
                return "0" + v_temp.ToString();
            }
            }
            return v_temp.ToString();
        }
        public bool KiemTraThoiGianVoiLuongCungHopLeForUpdate(decimal ip_dc_id_gd_he_so_lns, DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay)
        {
            CStoredProc v_cstore = new CStoredProc("pr_LNS_kiem_tra_thoi_gian_hop_le_voi_luong_cung_ForUpdate");
            v_cstore.addDecimalInputParam("@ip_dc_id_gd_he_so_lns", ip_dc_id_gd_he_so_lns);
            v_cstore.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);

            SqlParameter v_yn = v_cstore.addNVarcharOutputParam("@op_str_hop_le_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_yn.Value.ToString() == "Y" ? true : false;
        }
        public bool KiemTraThoiGianHopDongHopLeForUpdate(decimal ip_dc_id_gd_hop_dong, DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay)
        {
            CStoredProc v_cstore = new CStoredProc("pr_HD_du_lieu_hop_dong_hop_le_CheckUpdate");
            v_cstore.addDecimalInputParam("@ip_dc_id_gd_hop_hong", ip_dc_id_gd_hop_dong);
            v_cstore.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);

            SqlParameter v_yn = v_cstore.addNVarcharOutputParam("@op_str_hop_le_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_yn.Value.ToString() == "Y" ? true : false;
        }
        public void update_cau_hoi_cu()
        {
            CStoredProc v_cstore = new CStoredProc("pr_GD_CAU_HOI_HOC_VIEN_Update_cau_hoi_cu");

            v_cstore.addDecimalInputParam("@ID", this.dcID);
            v_cstore.addDecimalInputParam("@ID_TRANG_THAI", this.dcID_TRANG_THAI);
            v_cstore.addDecimalInputParam("@ID_DANH_GIA", this.dcID_DANH_GIA);
            v_cstore.addNVarcharInputParam("@GHI_CHU_Y_KIEN_KHAC", this.strGHI_CHU_Y_KIEN_KHAC);

            v_cstore.ExecuteCommand(this);
        }
        public bool KiemTraDuLieuCongTacHopLeForUpdate(decimal ip_dc_id_gd_cong_tac, DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay, decimal ip_dc_id_loai_cong_tac)
        {
            CStoredProc v_cstore = new CStoredProc("pr_CT_du_lieu_cong_tac_hop_le_CheckUpdate");
            v_cstore.addDecimalInputParam("@ip_dc_id_gd_cong_tac", ip_dc_id_gd_cong_tac);
            v_cstore.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay);
            v_cstore.addDecimalInputParam("@ip_dc_id_loai_cong_tac", ip_dc_id_loai_cong_tac);
            SqlParameter v_yn = v_cstore.addNVarcharOutputParam("@op_str_hop_le_yn", "");
            v_cstore.ExecuteCommand(this);

            return v_yn.Value.ToString() == "Y" ? true : false;
        }