public void GetBindingQcReturn(string returnNo) { QCReturnHdr qcReturnHdr = null; try { using (QCReturnBLL qcReturnBll = new QCReturnBLL()) { qcReturnHdr = qcReturnBll.GetQCReturn(returnNo); } if (qcReturnHdr != null) { this.txtRT_NO.Text = qcReturnHdr.RT_NO; this.txtRT_DATE.EditValue = qcReturnHdr.RT_DATE; this.txtPOST_REF.EditValue = qcReturnHdr.POST_REF; this.lueWarehouse.EditValue = qcReturnHdr.WH_ID; this.lueReturnType.EditValue = qcReturnHdr.RT_TYPE; this.txtREMARK.Text = qcReturnHdr.REMARK; this.icbREC_STAT.EditValue = qcReturnHdr.REC_STAT; this.GetQCReturnDetail(qcReturnHdr.RT_NO); } else { this.ClearDataOnScreen(); XtraMessageBox.Show(this, "No Data found.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }