User1312693872 posted
Hi, jagjit saini
Do you mean when rdr["Status"] is 'O', then Department.Status will be 'Open'? You can use the following:
Department.Status = rdr["Status"].ToString() == "O"? "Open":"Closed";
If what you talked about is the open or close of the
DataReader, could you please show more code details?
Best Regards,
Jerry Cai