BKI_DichVuMatDat.US.US_GD_QUY_TIEN_THUONG.kiem_tra_nam_das_thuong_hs_bo_sung C# (CSharp) Method

kiem_tra_nam_das_thuong_hs_bo_sung() public method

public kiem_tra_nam_das_thuong_hs_bo_sung ( decimal ip_dc_nam, string &op_str_nam_da_thuong_hs_bo_sung ) : void
ip_dc_nam decimal
op_str_nam_da_thuong_hs_bo_sung string
return void
        public void kiem_tra_nam_das_thuong_hs_bo_sung(decimal ip_dc_nam, ref string op_str_nam_da_thuong_hs_bo_sung)
        {
            CStoredProc v_obj = new CStoredProc("pr_CHECK_NAM_DA_CO_THUONG_HS_BO_SUNG_YN");

            v_obj.addDecimalInputParam("@ip_dc_nam", ip_dc_nam);

            SqlParameter v_str_nam_da_thuong_hs_bo_sung = v_obj.addNVarcharOutputParam("@op_str_nam_da_thuong_hs_bo_sung", "N");
            v_obj.ExecuteCommand(this);
            op_str_nam_da_thuong_hs_bo_sung = v_str_nam_da_thuong_hs_bo_sung.Value.ToString();
        }

Usage Example

        private bool kiem_tra_nam_da_thuong_hs_bo_sung(decimal ip_dc_nam)
        {
            DS_GD_QUY_TIEN_THUONG v_ds = new DS_GD_QUY_TIEN_THUONG();
            US_GD_QUY_TIEN_THUONG v_us = new US_GD_QUY_TIEN_THUONG();

            string op_str_nam_da_thuong_hs_bo_sung = "N"; //Y: da thuong va N: chua thuong
            v_us.kiem_tra_nam_das_thuong_hs_bo_sung(ip_dc_nam, ref op_str_nam_da_thuong_hs_bo_sung);

            if (op_str_nam_da_thuong_hs_bo_sung == "Y")
            {
                return true;
            }
            else
            {
                return false;
            }
        }