protected void btnReject_OnClick(object sender, EventArgs e) { SalesOrderBLL salesOrder = new SalesOrderBLL(); try { bool status = false; salesOrder.SalesRecordId = idLabel.Text.Trim(); salesOrder.SalesCenterId = salesCenterIdLabel.Text.Trim(); status = salesOrder.RejectRetailSales(); if (status) { string message = "Product's <span class='actionTopic'>Sales</span> Successfully Rejected By ID: <span class='actionTopic'>" + salesOrder.SalesRecordId + "</span>."; MyAlertBox("var callbackOk = function () { MyOverlayStart(); window.location = \"/UI/Sales/RetailSalesList.aspx\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", callbackOk);"); } else { string message = "Product's <span class='actionTopic'>Sales</span>Rejection Falied" + salesOrder.SalesRecordId + "</span>."; MyAlertBox("var callbackOk = function () { MyOverlayStart(); window.location = \"/UI/Sales/RetailSalesList.aspx\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", callbackOk);"); } } catch (Exception) { //throw; } finally { salesOrder = null; } }