protected void ContentRating1_Rated(object sender, Spaanjaars.Toolkit.RateEventArgs e) { int[] tempValues; tempValues = Values; Common objCommon = new Common(); SecurePage objSecurePage = new SecurePage(); string errMsg = ""; tempValues[Convert.ToInt32(e.RateValue) - 1] += 1; if (objSecurePage.IsLoggedInUSer == true) { int result = objCommon.InsertUserRating(objSecurePage.LoggedInUserId, RatingType, RatingId, tempValues[0], tempValues[1], tempValues[2], tempValues[3], tempValues[4], out errMsg);//Session["ExamId"] Values = tempValues; ContentRating1.DataSource = Values; ContentRating1.DataBind(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>MessageRating('" + errMsg + "');</script>", false); } else { string url = HttpContext.Current.Request.RawUrl; url = url.Substring(1, url.Length - 1); Response.Redirect(IryTech.AdmissionJankari.Components.Utils.AbsoluteWebRoot + "account/login?ReturnUrl=" + url); } }
private void UpdateUserTranscationalDetails() { var objSecurePage = new SecurePage(); var objCommon = new Common(); var objConsulling = new Consulling(); var formNum = "ADMJ" + System.DateTime.Now.Year + objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString(); try { var i = objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNum, true, "", "", "", "26100"); } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing UpdateUserTranscationalDetails in Payment.aspx for user :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
// Method to insert Update The Factor protected void InsertUpdateFactor(string factorName, int factorId = 0) { var objCommon = new Common(); var objSecurePage = new SecurePage(); try { var errMsg = ""; var i = objCommon.InsertUpdateFactor(factorName, out errMsg, objSecurePage.LoggedInUserId, factorId); lblSuccess.CssClass = "success show"; BindFactorMaster(); txtFactorName.Text = ""; hdnFactorId.Value = null; btnFactorInsertUpdate.Text = "Save"; } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing InsertUpdateFactor in FactorMaster.aspx :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private void FailureMsg() { var objSecurePage = new SecurePage(); lblName.Text = objSecurePage.LoggedInUserName; failureMsg.Visible = true; }
private void UpdateUserTransctionalDetails(string euserEmailId, string efrmNumber, string euserId) { var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo)); var objConsulling = new Consulling(); var objMailTemplates = new MailTemplates(); var objSecure = new SecurePage(); euserEmailId = euserEmailId.Replace(" ", "+"); string emailId = Convert.ToString(objCrypto.Decrypt(euserEmailId)); try { euserId = euserId.Replace(" ", "+"); string userId = Convert.ToString(objCrypto.Decrypt(euserId)); string frmNumber = efrmNumber.Replace(" ", "+"); frmNumber = Convert.ToString(objCrypto.Decrypt(frmNumber)); int i; i = objConsulling.InsertUpdateUserTransctionalDetails(Convert.ToInt32(userId), frmNumber, true, "online", "PNB", Convert.ToString(frmNumber + DateTime.Now.ToString( "hh:mm:ss")), Request.QueryString["Amount"] != null ? objCrypto.Decrypt(Request.QueryString["Amount"]) : "26100"); if (i > 0) { var userDetails = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(userId)); var sp = userDetails.First(); objSecure.LoggedInUserEmailId = emailId; objSecure.LoggedInUserId = sp.UserId; objSecure.LoggedInUserName = Common.GetStringProperCase(sp.UserFullName); objSecure.LoggedInUserType = sp.UserCategoryId; objSecure.LoggedInUserMobile = sp.MobileNo; lblName.Text = Common.GetStringProperCase(sp.UserFullName); var mail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = "AdmissionJankari:Direct Admission Payment confirmation for form number:" + frmNumber }; var body = objMailTemplates.MailBodyForPaymentConformation("http://www.admissionjankari.com/", sp.UserFullName, frmNumber, "Online", Convert.ToString(frmNumber + DateTime.Now.ToString("hh:mm:ss"))); mail.Body = body; mail.To.Add(emailId); mail.Bcc.Add(ClsSingelton.bccDirectAdmission); Utils.SendMailMessageAsync(mail); sucessMsg.Visible = true; } else { failureMsg.Visible = true; } } catch (Exception ex) { var err = ex.Message; failureMsg.Visible = true; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing UpdateUserTransctionalDetails in PaymentConformation.aspx for user :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private void BindUserDetailsForOnlinePayment() { SecurePage objSecurePage = new SecurePage(); try { if (objSecurePage.IsLoggedInUSer) { var userDetails = UserManager.Instance.GetUserListById(objSecurePage.LoggedInUserId).FirstOrDefault(); if (userDetails != null) { txtAddress.Text = userDetails.UserCorrespondenceAddress; txtCity.Text = userDetails.CityName; txtState.Text = userDetails.StateName; txtPincode.Text = userDetails.UserPincode; } } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing BindUserDetailsForOnlinePayment in PaymentOptions.aspx for user :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
protected void Finsh(object sender, EventArgs e) { var objSecurePage = new SecurePage(); var objConsulling = new Consulling(); _objCommon = new Common(); var objMailTemplates = new MailTemplates(); var ddNumber = string.Empty; var formNum = "ADMJ" + DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString(); var tranctionDetails = string.Empty; if (rbtnPaymentType.SelectedValue == "OnPayment") { OnlinePayment(); } int i = objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNum, false, rbtnPaymentType.SelectedItem.ToString(), "", "", "26100"); var mail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = "Direct Admission:Form Number" + formNum }; var body = objMailTemplates.SendValidationMailForTheBookSeat("http://www.admissionjankari.com/", objSecurePage.LoggedInUserName, formNum, rbtnPaymentType.SelectedItem.ToString(), _objCommon.CourseName); mail.Body = body; mail.To.Add(objSecurePage.LoggedInUserEmailId); mail.Bcc.Add(ClsSingelton.bccDirectAdmission); Utils.SendMailMessageAsync(mail); if (rbtnPaymentType.SelectedValue != "OnPayment") { Response.Redirect(Utils.AbsoluteWebRoot + "ConformationPage.aspx/"); } }
// Method to Bind The User Personel Info public void BindUserPersonelInfo() { SecurePage _objSecurePage = new SecurePage(); try { var UserDetails = UserManager.Instance.GetUserListById(_objSecurePage.LoggedInUserId); var sp = UserDetails.First(); lblName.Text = _objSecurePage.LoggedInUserName; lblEmailId.Text = _objSecurePage.LoggedInUserEmailId; lblMobile.Text = _objSecurePage.LoggedInUserMobile; ConsullingCourseId = sp.CourseId; var CourseDetails = CourseProvider.Instance.GetCourseById(sp.CourseId); var CourseInfo = CourseDetails.First(); lblCourse.Text = CourseInfo.CourseName; } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing BindUserPersonelInfo in UcStudentPersonelInfo.axcs :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private void GetMaximumaMarks(int courseId) { var objSecurePage = new SecurePage(); DataSet collegeData = null; var dataStatus = 0; var errMsg = ""; var objConsulling = new Consulling(); var objDataTable = objConsulling.GetMaximiumMarksByCourseId(courseId, objSecurePage.LoggedInUserId); if (objDataTable != null && objDataTable.Rows.Count > 0) { collegeData = objConsulling.CheckCollegeSeatAvialibity( Convert.ToInt32(Request.QueryString["collegeId"]), Convert.ToInt32( objDataTable.Rows[0]["TotalMarks"].ToString()), out dataStatus, out errMsg); } switch (dataStatus) { case -1: UcSeatAvailiablity.CollegeBranchCourseId = Request.QueryString["collegeId"]; UcSeatAvailiablity.DataStatus = errMsg; break; case 1: UcSeatAvailiablity.DataStatus = errMsg; UcSeatAvailiablity.BindRepesater = collegeData; break; } }
protected void BtnChangePasswordClick(object sender, EventArgs e) { SecurePage objSecurePage = new SecurePage(); try { int i = ChangePassword(objSecurePage.LoggedInUserId, txtOldPassword.Text, txtNewPassword.Text); if (i > 0) { var mail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = "AdmissionJankari: Password reset " }; var body = _objMailTemplete.MailBodyForGetPassword(objSecurePage.LoggedInUserEmailId, txtNewPassword.Text, objSecurePage.LoggedInUserName); mail.Body = body; mail.To.Add(txtEmailId.Text); mail.IsBodyHtml = true; Utils.SendMailMessageAsync(mail); } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.InnerException.Message; } const string addInfo = "Error while executing BtnChangePasswordClick in UcChangePassword.ascx :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private void AddLocalsMenu(Control ul) { // County Admins always see a local menu // Masters and State Admins see it if they are on a County or Local Admin page string stateCode = null; string countyCode = null; if (SecurePage.IsCountyAdminUser || (SecurePage.IsMasterUser || SecurePage.IsStateAdminUser) && (SecurePage.IsCountyAdminPage || SecurePage.IsLocalAdminPage)) { stateCode = SecurePage.FindStateCode(); countyCode = SecurePage.FindCountyCode(); } var template = "/admin/{page}?state={StateCode}&county={CountyCode}&local={LocalKey}"; if (SecurePage.IsStateAdminUser) { template = "/admin/{page}?county={CountyCode}&local={LocalKey}"; } else if (SecurePage.IsCountyAdminUser) { template = "/admin/{page}?local={LocalKey}"; } template = GetMenuPage(template); if (stateCode != null && countyCode != null) { AddMenuItem(ul, "Locals", GetLocalsMenu(template, stateCode, countyCode)); } }
private void AddCountiesMenu(Control ul) { // State Admins always see a counties menu // Masters see it if they are on a page with a state code var stateCode = SecurePage.FindStateCode(); if (!StateCache.IsValidStateCode(stateCode)) { return; } var template = Empty; if (SecurePage.IsMasterUser && !IsNullOrWhiteSpace(stateCode)) { template = "/admin/{page}?state={StateCode}&county={CountyCode}"; } else if (SecurePage.IsStateAdminUser) { template = "/admin/{page}?county={CountyCode}"; } if (!IsNullOrWhiteSpace(template)) { template = GetMenuPage(template); AddMenuItem(ul, " Counties", GetCountiesMenu(template, stateCode)); } }
private static void AddMasterOfficesMenu(Control parent) { // Masters only see it if they are on an Admin page if (!SecurePage.IsMasterUser) { return; } string stateCode = null; if (SecurePage.IsAdminPage) { stateCode = SecurePage.FindStateCode(); } if (StateCache.IsValidStateCode(stateCode)) { var ul = CreateDropdownMenu(); var countyCode = SecurePage.FindCountyCode(); var localKey = SecurePage.FindLocalKey(); AddMenuItem(ul, "Manage Offices, Office Templates and Incumbents", SecureAdminPage.GetUpdateOfficesPageUrl(stateCode, countyCode, localKey)); AddMenuItem(ul, "Offices Report", SecureAdminPage.GetOfficesPageUrl(stateCode, countyCode, localKey)); AddMenuItem(ul, "Incumbents Report", SecureAdminPage.GetOfficialsPageUrl(stateCode, countyCode, localKey)); AddMenuItem(ul, "Download County or Local Offices CSV", SecureAdminPage.GetAdminFolderPageUrl("DownloadOfficesCsv", "state", stateCode)); AddMenuItem(parent, "Offices", ul); } }
// Method to Bind The User Details if User Want to make the payment protected void GetUserDetails(string courseId, string userId) { var objCrypto = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo)); _objCommon = new Common(); var objSecurePage = new SecurePage(); try { courseId = objCrypto.Decrypt(courseId); userId = objCrypto.Decrypt(userId); _objCommon.CourseId = Convert.ToInt16(courseId); var userDetails = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(userId)).FirstOrDefault(); if (userDetails != null) { objSecurePage.LoggedInUserEmailId = userDetails.UserEmailid; objSecurePage.LoggedInUserId = userDetails.UserId; objSecurePage.LoggedInUserMobile = userDetails.MobileNo; objSecurePage.LoggedInUserName = userDetails.UserFullName; objSecurePage.LoggedInUserType = userDetails.UserCategoryId; } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing GetUserDetails in PaymentOptions.aspx for user :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private static void AddJurisdictionsMenu(Control ul) { var stateCode = SecurePage.FindStateCode(); AddMenuItem(ul, "Jurisdictions", SecureAdminPage.GetUpdateJurisdictionsPageUrl(stateCode, SecurePage.FindCountyCode(), SecurePage.FindLocalKey())); }
protected int InsertUserBasicInfo() { string ErrMsg = ""; int UserId = 0; _objSecurePage = new SecurePage(); _ObjUserRegistrationProperty = new UserRegistrationProperty(); try { _ObjUserRegistrationProperty = new UserRegistrationProperty { UserFullName = studentPerInfo.StudentName, UserGender = studentPerInfo.StudentGender, UserEmailid = studentPerInfo.StudentEmaiLid, MobileNo = studentPerInfo.StudentMobileNo, PhoneNo = studentPerInfo.StudentAlternameNo, CourseId = StudentCourseInfo.StudentCourse, UserCategoryId = Convert.ToInt16(Usertype.Student), UserDOB = Convert.ToDateTime(studentPerInfo.StudentDOB), UserFatherName = studentPerInfo.FatherName, UserStatus = true, UserPassword = studentPerInfo.StudentMobileNo }; int i = UserManagerProvider.Instance.InsertUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg); UserId = _ObjUserRegistrationProperty.UserId; if (i <= 0) { _ObjUserRegistrationProperty.UserId = UserId; i = UserManagerProvider.Instance.UpdateUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg); } if (i > 0) { _objSecurePage = new SecurePage(); _objSecurePage.LoggedInUserEmailId = studentPerInfo.StudentEmaiLid; _objSecurePage.LoggedInUserId = UserId; _objSecurePage.LoggedInUserMobile = studentPerInfo.StudentMobileNo; _objSecurePage.LoggedInUserName = studentPerInfo.StudentName; _objSecurePage.LoggedInUserType = Convert.ToInt16(Usertype.Student); } _ObjConsulling = new Consulling(); _ObjCommon = new Common(); string formNumber = "ADMJ" + System.DateTime.Now.Year + _ObjCommon.CourseId.ToString() + _objSecurePage.LoggedInUserId.ToString(); i = _ObjConsulling.InsertUpdateUserTransctionalDetails(_objSecurePage.LoggedInUserId, formNumber); } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing InsertUserBasicInfo in StudentCounselling.axpx :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } return(UserId); }
protected void wizardApplyForm_ActiveStepChanged(object sender, EventArgs e) { _objSecurePage = new SecurePage(); int i = 0; _ObjCommon = new Common(); switch (wizardApplyForm.ActiveStep.ID) { case "Instrucation": { wizardApplyForm.StepNextButtonText = "I Accept »"; i = InsertUserBasicInfo(); divSeccondImage.Visible = true; divFirstImage.Visible = false; break; } case "AcedmicInfo": { wizardApplyForm.StepNextButtonText = "Next »"; if (string.IsNullOrEmpty(StudentCourseInfo.StudentCourseEligibilty)) { StudentAcademicInfo.ValidateAcademicInfo(_ObjCommon.CourseId); StudentAcademicInfo.BindLateralEntryInfo(_ObjCommon.CourseId); } else { StudentAcademicInfo.BindLateralEntryInfo(0); StudentAcademicInfo.HideShowAcademicInfo(StudentCourseInfo.StudentCourseEligibilty); } break; } case "Interested": { wizardApplyForm.StepNextButtonText = "Next »"; i = InsertUpdateAcademicInfo(_objSecurePage.LoggedInUserId); break; } case "ExamAppeared": { wizardApplyForm.StepNextButtonText = "Next »"; i = InsertCollegePrefrance(_objSecurePage.LoggedInUserId, _ObjCommon.CourseId); i = InsertCityPrefrance(_objSecurePage.LoggedInUserId); i = InsertUpdateExamApp(_objSecurePage.LoggedInUserId); break; } } }
protected void Page_Load(object sender, EventArgs e) { var objSecurePage = new SecurePage(); if (!IsPostBack) { ContentRating1.ItemId = Guid.NewGuid(); Rate1 = 1; ContentRating1.DataSource = Values; ContentRating1.DataBind(); } }
private static void AddJurisdictionsMenu(Control ul) { var stateCode = SecurePage.GetViewStateStateCode(); if (!StateCache.IsValidStateCode(stateCode)) { stateCode = string.Empty; } AddMenuItem(ul, "Jurisdictions", SecureAdminPage.GetUpdateJurisdictionsPageUrl(stateCode, SecurePage.GetViewStateCountyCode(), SecurePage.GetViewStateLocalCode())); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } BindPageTitleAndKeyWords(); var objSecurePage = new SecurePage(); lblUserName.Text = Common.GetStringProperCase(objSecurePage.LoggedInUserName); CheckPaymentStatus(objSecurePage.LoggedInUserId); }
private void SucessMsg() { var totalAmountPayed = 0; var objSecurePage = new SecurePage(); var orderNumber = "ADMJPROD" + System.DateTime.Now.Year + "UID" + objSecurePage.LoggedInUserId.ToString(); var objCarProduct = new Common().GetProductForCart(0, orderNumber, 0); for (var i = 0; i <= objCarProduct.Tables[0].Rows.Count - 1; i++) { totalAmountPayed = Convert.ToInt32(objCarProduct.Tables[0].Rows[i]["PayProductAmount"]) + totalAmountPayed; } lblAmount.Text = string.Format("Rs. {0}", totalAmountPayed); lblName.Text = objSecurePage.LoggedInUserName; sucessMsg.Visible = true; }
// ReSharper disable once UnusedMethodReturnValue.Local private static UploadDataItem[] GetTabInfo(SecurePage page) { var uploadDataInfo = new[] { new UploadDataItem { Column = "Overwrite", Description = "Overwrite Existing CSV" }, new UploadDataItem { Column = "SaveAs", Description = "Save CSV As" } }; uploadDataInfo.Initialize(page, GroupName); return(uploadDataInfo); }
// 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 static void AddElectionsMenu(Control ul) { // Admins always see an elections menu // Masters see it if they are on any Admin page string stateCode = null; if (SecurePage.IsMasterUser && SecurePage.IsAdminPage) { stateCode = SecurePage.FindStateCode(); } if (SecurePage.IsAdminUser || StateCache.IsValidStateCode(stateCode)) { AddMenuItem(ul, "Elections", SecureAdminPage.GetUpdateElectionsPageUrl(stateCode, SecurePage.FindCountyCode(), SecurePage.FindLocalKey())); } }
private void AddCountiesMenu(Control ul) { // State Admins always see a counties menu // Masters see it if they are on any Admin page string stateCode = null; if (SecurePage.IsStateAdminUser || (SecurePage.IsMasterUser && SecurePage.IsAdminPage)) { stateCode = SecurePage.GetViewStateStateCode(); } if (StateCache.IsValidStateCode(stateCode)) { AddMenuItem(ul, stateCode + " Counties", GetCountiesMenu("/admin?state={StateCode}&county={CountyCode}", stateCode)); } }
protected void LoginButtonClick(object sender, EventArgs e) { _objSecurePage = new SecurePage(); try { var canCreateUser = false; var userStatus = false; var errMsg = ""; var mobileNo = ""; var landingPage = ""; var userName = ""; int userId; int userTypeId; bool UserStatus; var result = UserManagerProvider.Instance.DoLogin(txtUserName.Text.Trim(), txtPassword.Text.Trim(), out userTypeId, out userId, out userName, out landingPage, out mobileNo, out canCreateUser, out errMsg, out UserStatus); if (result) { _objSecurePage.LoggedInUserId = userId; _objSecurePage.LoggedInUserType = userTypeId; _objSecurePage.LoggedInUserEmailId = txtUserName.Text; _objSecurePage.LoggedInUserName = userName; _objSecurePage.LoggedInUserMobile = mobileNo; _objSecurePage.CanCreateUser = canCreateUser; Response.Redirect(landingPage); } else { lblInfo.Visible = true; lblInfo.Text = errMsg; } } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.InnerException.Message; } const string addInfo = "Error while executing DoLogin in Login.ascx :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }
private static void AddOfficesMenu(Control ul) { // Admins always see an offices menu // Masters see it if they are on any Admin page string stateCode = null; if (SecurePage.IsAdminUser || (SecurePage.IsMasterUser && SecurePage.IsAdminPage)) { stateCode = SecurePage.GetViewStateStateCode(); } if (StateCache.IsValidStateCode(stateCode)) { AddMenuItem(ul, "Offices", SecureAdminPage.GetUpdateOfficesPageUrl(stateCode, SecurePage.GetViewStateCountyCode(), SecurePage.GetViewStateLocalCode())); } }
private void InsertUpdateCoursePaymentMasterDetails() { SecurePage _objSecurePage = new SecurePage(); string errMsg = ""; int result; if (btntCoursePaymentAmount.Text == "Save") { result = CourseProvider.Instance.InsertCoursePaymentMasterDetails(Convert.ToInt32(ddlCourse.SelectedValue.ToString()), txtOnlinePaymentAmount.Text.Trim(), txtOfflinePaymentAmount.Text.Trim(), out errMsg, 1); if (result > 0) { lblMsg.Visible = true; lblMsg.Attributes.Add("class", "success hide"); lblMsg.InnerText = errMsg; ClearFields(); } else { lblMsg.Visible = true; lblMsg.Attributes.Add("class", "error"); lblMsg.InnerText = errMsg; } } else { result = CourseProvider.Instance.UpdateCoursePaymentMasterDetails(Convert.ToInt16(0), Convert.ToInt32(ddlCourseCategory.SelectedValue.ToString()), txtOnlinePaymentAmount.Text.Trim(), txtOfflinePaymentAmount.Text.Trim(), out errMsg, 1); if (result > 0) { btntCoursePaymentAmount.Text = "Save"; lblMsg.Visible = true; lblMsg.Attributes.Add("class", "success"); lblMsg.InnerText = errMsg; BindCoursePaymentMaster(); ClearFields(); } else { lblMsg.Visible = true; lblMsg.Attributes.Add("class", "error"); lblMsg.InnerText = _objCommon.GetErrorMessage("noRecords") ?? "N/A"; } } }
internal void Initialize(SecurePage page) { _TabLabel = page.Master.FindMainContentControl("TabMain" + TabName) as HtmlAnchor; _Button = page.Master.FindMainContentControl("Button" + TabName); _DescriptionTag = page.Master.FindMainContentControl("Description" + TabName) as HtmlInputHidden; Debug.Assert(_TabLabel != null, "_TabLabel != null"); var li = _TabLabel.Parent as HtmlGenericControl; var astDiv = new HtmlDiv(); astDiv.Attributes.Add("class", "tab-ast tiptip"); if (TabAsteriskToolTip != null) { astDiv.Attributes.Add("title", TabAsteriskToolTip); } else { astDiv.Attributes.Add("title", "There are unsaved changes on the " + _TabLabel.InnerText + " tab"); } astDiv.AddTo(li); if (_Button != null) { if (ButtonToolTip != null) { _Button.SetToolTip(ButtonToolTip); } else { _Button.SetToolTip("Update " + _TabLabel.InnerText); } } if (_DescriptionTag != null) { _DescriptionTag.Value = _TabLabel.InnerText; } }
protected void btnAbuseReport_Click(object sender, EventArgs e) { var objMailTemplete = new MailTemplates(); var errMsg = ""; var objSecure = new SecurePage(); var result = new Common().InsertAbuseReport(objSecure.LoggedInUserId, Convert.ToInt32(ddlReportAbuseList.SelectedValue), txtReportAbuseContent.Text.Trim(), AbuseType, Convert.ToInt32(AbuseTypeId), out errMsg); if (result > 0) { var objMail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = "Abuse content information" }; var mailbody = objMailTemplete.MailToUserForAbuse(objSecure.LoggedInUserName, ddlReportAbuseList.SelectedItem.Text); objMail.Body = mailbody; objMail.To.Add(objSecure.LoggedInUserEmailId); objMail.IsBodyHtml = true; Utils.SendMailMessageAsync(objMail); var mail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = "Abuse content information by " + objSecure.LoggedInUserName }; var body = objMailTemplete.MailToAdminForAbuse(objSecure.LoggedInUserName, objSecure.LoggedInUserEmailId, objSecure.LoggedInUserMobile, txtReportAbuseContent.Text, ddlReportAbuseList.SelectedItem.Text); mail.Body = body; mail.To.Add(ClsSingelton.CommentMailId); mail.IsBodyHtml = true; Utils.SendMailMessageAsync(mail); } ddlReportAbuseList.ClearSelection(); txtReportAbuseContent.Text = string.Empty; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>Message('" + result + "','" + errMsg + "');</script>", false); }