protected void saveButton_Click(object sender, EventArgs e) { SalesOrderBLL salesOrder = new SalesOrderBLL(); try { if (uncollectableAmountTextBox.Text!="0.00") { salesOrder.SaveUncollectableAmountBySalesRecordId(idLabel.Text.Trim(),uncollectableAmountTextBox.Text.Trim()); uncollectableAmountTextBox.Text = "0.00"; GetSalesRecordById(salesRecordIdForViewHiddenField.Value.Trim()); GetSalesRecordProductListById(salesRecordIdForViewHiddenField.Value.Trim()); } else { msgbox.Visible = true; msgTitleLabel.Text = "Validation Requiered."; msgDetailLabel.Text = "Amounts Field is Empty!!!"; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { salesOrder = null; } }