// Method to Bind Payment Amount private void BindPaymentAmount(int courseId) { _objConsulling = new Consulling(); var objSecurePage = new SecurePage(); try { if (objSecurePage.IsLoggedInUSer) { var data = _objConsulling.GetPaymentTransactionStatus(objSecurePage.LoggedInUserId); if (data != null && data.Count > 0) { var data1 = data.FirstOrDefault(); if (data1 != null) { lblCheque.Text = data1.PaymentAmount; lblDemand.Text = data1.PaymentAmount; lblCash.Text = data1.PaymentAmount; } } else { lblCheque.Text = _objConsulling.GetPayemntAmountAccordingToCourse(courseId); lblDemand.Text = lblCheque.Text; lblCash.Text = lblCheque.Text; } } else { lblCheque.Text = _objConsulling.GetPayemntAmountAccordingToCourse(courseId); lblDemand.Text = lblCheque.Text; lblCash.Text = lblCheque.Text; } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing BindPaymentAmount in UcStudentPaymentOption.axcs :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private void CheckPaymentStatus(int userId) { var objConsulling = new Consulling(); try { var data = objConsulling.GetPaymentTransactionStatus(userId); if (data.Count > 0) { var result = data.First(); if (result.StudentPaymentStatus == true) { sucess.Visible = true; failure.Visible = false; } else { sucess.Visible = false; failure.Visible = true; } } else { sucess.Visible = false; failure.Visible = true; } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.InnerException.Message; } const string addInfo = "Error While fetching CheckPaymentStatus in Confirmation.aspx :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }