public void LoadSIList() { try { NameValueCollection para = new NameValueCollection(); CommonListBL objList = new CommonListBL(); para.Add("@i_CustomerID", _CustomerID.ToString()); dtblCustomerPaymentDetail = objList.ListOfRecord("usp_CustomerPayment_PendingSI_List", para, "Customer Payemnt- LoadSIList"); if (objList.Exception == null) { dgvCustomerPaymentDetail.AutoGenerateColumns = false; dgvCustomerPaymentDetail.DataSource = dtblCustomerPaymentDetail; if (_Mode == (int)Common.Constant.Mode.Modify) { dgvCustomerPaymentDetail.Columns["Select"].DataPropertyName = dtblCustomerPaymentDetail.Columns["RecDetID"].ToString(); } dgvCustomerPaymentDetail.Columns["PaidAmount"].DataPropertyName = dtblCustomerPaymentDetail.Columns["PaidAmount"].ToString(); dgvCustomerPaymentDetail.Columns["PendingAmount"].DataPropertyName = dtblCustomerPaymentDetail.Columns["PendingAmount"].ToString(); dgvCustomerPaymentDetail.Columns["SalesInvoice"].DataPropertyName = dtblCustomerPaymentDetail.Columns["SalesCode"].ToString(); dgvCustomerPaymentDetail.Columns["SIID"].DataPropertyName = dtblCustomerPaymentDetail.Columns["SIID"].ToString(); dgvCustomerPaymentDetail.Columns["SalesDate"].DataPropertyName = dtblCustomerPaymentDetail.Columns["SalesDate"].ToString(); dgvCustomerPaymentDetail.Columns["ReminderDate"].DataPropertyName = dtblCustomerPaymentDetail.Columns["ReminderDate"].ToString(); dgvCustomerPaymentDetail.Columns["SecurityDeposite"].DataPropertyName = dtblCustomerPaymentDetail.Columns["SecurityDeposite"].ToString(); for (int i = 0; i < dgvCustomerPaymentDetail.Columns.Count; i++) { dgvCustomerPaymentDetail.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable; dgvCustomerPaymentDetail.Columns["PaidAmount"].ReadOnly = true; } } else { MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception exc) { Utill.Common.ExceptionLogger.writeException("CustomerPayment - LoadSIList", exc.StackTrace); MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception"); } }