public void Count_Nhan_vien(ref decimal op_dc_tong_so, ref decimal op_dc_hien_tai)
        {
            CStoredProc  v_sp  = new CStoredProc("pr_V_GD_QUA_TRINH_LAM_VIEC_Count");
            SqlParameter v_pa1 = v_sp.addDecimalOutputParam("@SO_LUONG_HIEN_TAI", op_dc_hien_tai);
            SqlParameter v_pa2 = v_sp.addDecimalOutputParam("@TONG_SO", op_dc_tong_so);

            v_sp.ExecuteCommand(this);
            op_dc_tong_so  = CIPConvert.ToDecimal(v_pa2.Value);
            op_dc_hien_tai = CIPConvert.ToDecimal(v_pa1.Value);
        }
        public void FillDatasetByName(DS_CM_DM_TU_DIEN op_ds, string ip_str_search, ref decimal op_dc_id)
        {
            CStoredProc v_store = new CStoredProc("pr_CM_DM_TU_DIEN_search_by_name");

            v_store.addNVarcharInputParam("@ip_str_search", ip_str_search);
            SqlParameter v_sql = v_store.addDecimalOutputParam("@ID", op_dc_id);

            v_store.fillDataSetByCommand(this, op_ds);
            op_dc_id = CIPConvert.ToDecimal(v_sql.Value);
        }
        public void Count_Nhan_vien(ref decimal op_dc_hien_tai)
        {
            CStoredProc  v_sp  = new CStoredProc("pr_V_GD_TRANG_THAI_LD_Count");
            SqlParameter v_pa1 = v_sp.addDecimalOutputParam("@SO_LUONG_HIEN_TAI", op_dc_hien_tai);

            v_sp.ExecuteCommand(this);
            op_dc_hien_tai = CIPConvert.ToDecimal(v_pa1.Value);
            //op_dc_hien_tai = CIPConvert.ToDecimal(cmd.Parameters["@SO_LUONG_HIEN_TAI"].Value.ToString());
            //op_dc_tong_so = CIPConvert.ToDecimal(cmd.Parameters["@TONG_SO"].Value.ToString());
        }
Beispiel #4
0
        public decimal get_id_td_dich_vu(decimal v_id_loai_dich_vu, decimal v_id_td)
        {
            decimal     count    = 0;
            CStoredProc v_cstore = new CStoredProc("get_id_td_dich_vu");

            v_cstore.addDecimalInputParam("@id", v_id_loai_dich_vu);
            v_cstore.addDecimalInputParam("@v_id_td", v_id_td);
            SqlParameter v_result = v_cstore.addDecimalOutputParam("@count", count);

            v_cstore.ExecuteCommand(this);
            return((decimal)v_result.Value);
        }
        /// <summary>
        /// Kiểm tra xem nhân viên ở pháp nhân đã có lương hiện tại hay chưa
        /// </summary>
        /// <param name="ip_ma_nv">Mã nhân viên</param>
        /// <param name="ip_id_phap_nhan">Id pháp nhân</param>
        /// <returns>Có lương hiện tại hay không</returns>
        public bool is_exist_luong_hien_tai(String ip_ma_nv, decimal ip_id_phap_nhan)
        {
            CStoredProc v_sp = new CStoredProc("pr_V_GD_LUONG_THEO_QD_is_exist_luong_hien_tai");

            Decimal op_existed_rows = 0;

            v_sp.addNVarcharInputParam("@ip_ma_nv", ip_ma_nv);
            v_sp.addDecimalInputParam("@ip_id_phap_nhan", ip_id_phap_nhan);
            v_sp.addDecimalOutputParam("@op_existed_rows", op_existed_rows);

            return(op_existed_rows > 0);
        }
        public void count_chuc_vu_chinh_hien_tai(DS_V_GD_QUA_TRINH_LAM_VIEC op_ds, decimal ip_dc_id_nhan_su, decimal ip_dc_id_update, decimal ip_dc_id_phap_nhan, ref decimal op_dc_count)
        {
            CStoredProc v_sp = new CStoredProc("[pr_V_GD_QUA_TRINH_LAM_VIEC_count_chuc_vu_chinh_hien_tai]");

            v_sp.addDecimalInputParam("@ID_NHAN_SU", ip_dc_id_nhan_su);
            v_sp.addDecimalInputParam("@ID_UPDATE", ip_dc_id_update);
            v_sp.addDecimalInputParam("@ID_PHAP_NHAN", ip_dc_id_phap_nhan);
            SqlParameter v_sql = v_sp.addDecimalOutputParam("@Count", op_dc_count);

            v_sp.fillDataSetByCommand(this, op_ds);

            op_dc_count = CIPConvert.ToDecimal(v_sql.Value);
        }
Beispiel #7
0
        public bool check_phap_nhan_is_null(decimal ip_dc_id_nhan_su)
        {
            CStoredProc v_cst = new CStoredProc("pr_DM_NHAN_SU_check_phap_nhan_null");

            v_cst.addDecimalInputParam("@ID_NHAN_SU", ip_dc_id_nhan_su);
            SqlParameter v_sql = v_cst.addDecimalOutputParam("@Count", 1);

            v_cst.ExecuteCommand(this);
            if (CIPConvert.ToDecimal(v_sql.Value) > 0)
            {
                return(false);
            }
            return(true);
        }
        /// <summary>
        /// Kiểm tra xem ngoài bản ghi hiện tại, còn bản ghi nào có cùng mã nhân viên + pháp nhân đã có lương hiện tại hay không
        /// </summary>
        /// <param name="ip_id_gd_luong_theo_qd">Id bản ghi hiện tại</param>
        /// <param name="ip_ma_nv">Mã nhân viên của bản ghi hiện tại</param>
        /// <param name="ip_id_phap_nhan">Id pháp nhân ban quyết định thuộc bản ghi hiện tại</param>
        /// <returns>Có lương hiện tại hay không</returns>
        public bool is_exist_luong_hien_tai(decimal ip_id_gd_luong_theo_qd, string ip_ma_nv, decimal ip_id_phap_nhan)
        {
            CStoredProc v_sp = new CStoredProc("pr_V_GD_LUONG_THEO_QD_is_exist_luong_hien_tai");

            v_sp.addDecimalInputParam("@ip_id_gd_luong_theo_qd", ip_id_gd_luong_theo_qd);
            v_sp.addNVarcharInputParam("@ip_ma_nv", ip_ma_nv);
            v_sp.addDecimalInputParam("@ip_id_phap_nhan", ip_id_phap_nhan);

            SqlParameter op_existed_rows = v_sp.addDecimalOutputParam("@op_existed_rows", 1);

            v_sp.ExecuteCommand(this);

            return(CIPConvert.ToDecimal(op_existed_rows.Value) > 0);
        }
Beispiel #9
0
        public decimal count_trang_thai_hien_tai_phap_nhan(decimal ip_dc_id_nhan_su
                                                           , decimal ip_dc_id_phap_nhan
                                                           , decimal ip_dc_id_update
                                                           )
        {
            decimal     v_dc_count = 0;
            CStoredProc v_cst      = new CStoredProc("pr_V_GD_TRANG_THAI_LAO_DONG_count_hien_tai_theo_phap_nhan");

            v_cst.addDecimalInputParam("@ID_NHAN_SU", ip_dc_id_nhan_su);
            v_cst.addDecimalInputParam("@ID_PHAP_NHAN", ip_dc_id_phap_nhan);
            v_cst.addDecimalInputParam("@ID_UPDATE", ip_dc_id_update);
            SqlParameter v_sql = v_cst.addDecimalOutputParam("@count", v_dc_count);

            v_cst.ExecuteCommand(this);
            v_dc_count = CIPConvert.ToDecimal(v_sql.Value);
            return(v_dc_count);
        }
        public decimal Sum_ty_le_tham_gia(string ip_str_ma_nv, string ip_str_trang_thai_chuc_vu_yn, decimal ip_id_phap_nhan)
        {
            decimal     v_dc_ty_le = 0;
            CStoredProc v_sp       = new CStoredProc("pr_V_GD_QUA_TRINH_LAM_VIEC_Sum_Ty_le_tham_gia");

            v_sp.addNVarcharInputParam("@MA_NV", ip_str_ma_nv);
            v_sp.addDecimalInputParam("@ID_PHAP_NHAN", ip_id_phap_nhan);
            v_sp.addNVarcharInputParam("@TRANG_THAI_CHUC_VU_YN", ip_str_trang_thai_chuc_vu_yn);
            SqlParameter v_pa_ty_le = v_sp.addDecimalOutputParam("@TONG_TY_LE", v_dc_ty_le);

            v_sp.ExecuteCommand(this);
            if (CIPConvert.is_valid_number(v_pa_ty_le.Value) == false)
            {
                return(0);
            }

            return(CIPConvert.ToDecimal(v_pa_ty_le.Value));
        }