private void cmbType_SelectedIndexChanged(object sender, EventArgs e) { string STEP_PRICE = "0"; if (cmbfree.Text != "" && cmbType.Text != "") { if ("Y".Equals(cmbfree.Text.Substring(0, 1))) { STEP_PRICE = "isnull(STEP_PRICE,0)"; } else if ("N".Equals(cmbfree.Text.Substring(0, 1))) { STEP_PRICE = "0"; } if ("B".Equals(cmbType.Text.Substring(0, 1))) { DataTable dt = FunPublic.GetDt("select null LINE_ID,STEPCode,STEPName,Quantity,WORKSHOP_CODE,STEPSEQ,case STATUS when 'T' then isnull(STEP_PRICE,0) else " + STEP_PRICE + " end as STEP_PRICE,isnull(STEP_PRICE,0) as STEP_PRICE_H,case STATUS when 'T' then 'N' else 'Y' end IsFinish from Doc_Prodcutpackage14 where RFID_ID = '" + txtRFID.Text + "' and EBDOC = '" + txtEBNum.Text + "' and CSKU_CODE = '" + txtCSKU_CODE.Text + "' order by STEPSEQ"); FunPublic.View_ListView(dt, listView1); cmbRejectStationf.Enabled = false; } else if ("A".Equals(cmbType.Text.Substring(0, 1))) { cmbRejectStationf.Enabled = true; listView1.Items.Clear(); } } }