mardi 19 octobre 2021

how to return blank values with checked checkbox

How to return blank values from datagridview columns using checkbox, who is checked. So how it is in both pictures, I want to filter blank rows without date and it should work as filter as blank.

That checkbox gets data from database.

I tried some if statements in my sql procedure.

if @INNOT_CLOSED_CARDS is not null
        set @WHERE = @WHERE + 'AND EXISTS (select hosp_ID from D3_HOSPITALIZATION
            where isnull(CLOSE_DATE,'''') = '''')'

Or something like this.

if @INNOT_CLOSED_CARDS = 1
    BEGIN
        set @WHERE = @WHERE + ' AND (CLOSE_DATE is null)'
    END ELSE if @INNOT_CLOSED_CARDS = 0
    BEGIN
        set @WHERE = @WHERE + ' AND (CLOSE_DATE is not null)'
    END

Well, it does nothing.

enter image description here

enter image description here




Aucun commentaire:

Enregistrer un commentaire