/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { // If project id is in session then binds deposit details by project id on page load if (Session[SessionName.ProjectId] != null) { // Sets financial information about client, office and deposit balances. SetFinancialInfo(); BindClientBills(); } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
/// <summary> /// Loads page with default values /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { // If project id is in session then binds office details by project id on page load if (Session[SessionName.ProjectId] != null) { // Sets financial information about client, office and deposit balances. SetFinancialInfo(); // Sets financial balances by project id SetFinancialBalances(); } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { BindFeeEarner(); BindAssociationRoles(); ShowHideAssociationSearch(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.Text = string.Empty; timeDetails = (TimeDetails)Session[SessionName.TimeDetails]; if (!IsPostBack) { try { if (timeDetails == null) { _lblError.Text = "Session is timeout or time details are not saved in the previous screen. Please go back and enter details again."; return; } ViewState["CurrentAdditionalDetail"] = null; ViewState["FileReviewProjectId"] = DataConstants.DummyGuid.ToString(); LoadAdditionalDetailTimeEntry(); } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; Title = string.Format("Feedback to {0}", Solicitors.Branding.Strings.DivisionName); this.feedbackTitle.InnerText = string.Format("Feedback to {0}", Solicitors.Branding.Strings.DivisionName); }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (Request.QueryString["edit"] != "true") { _divBtnAddNew.Visible = false; } else { _divReset.Visible = false; } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } // if (!IsPostBack) LoadPageDetails(); }
protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.CssClass = "errorMessage"; _lblError.Text = string.Empty; //Set the page size for the grids _grdSearchTaskList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { _ccDateTo.DateText = DateTime.Now.ToString("dd/MM/yyyy"); BindUsers(); BindTaskStatus(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.Text = string.Empty; _lblError.CssClass = "errorMessage"; //Set the page size for the grids _grdSearchAppointmentList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { BindUsers(); GetDefaultFeeEarnerDetails(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.CssClass = "errorMessage"; _lblError.Text = string.Empty; _editMode = false; if (Session[SessionName.DocumentId] != null) { if (Convert.ToInt32(Session[SessionName.DocumentId]) > 0) { _editMode = true; } } GetFileTypesForUpload(); if (!IsPostBack) { try { //BindDocumentTypes(); BindFeeEarner(); //_ddlDocType.Attributes.Add("readonly", "readonly"); if (_logonSettings.UserType == (int)DataConstants.UserType.Client || _logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { _chkPublic.Checked = true; _chkPublic.Enabled = false; } if (_editMode == true) { DisplayDocumentDetails(); return; } //_txtFileName.Visible = false; _ccCreatedDate.Enabled = false; _fileName.Visible = true; _trFileUpload.Style["display"] = ""; //_ddlDocType.Enabled = true; // By Default Document Type should be "Document" //_ddlDocType.Items.FindByValue("3").Selected = true; } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; //Set the page size for the grids _grdTodaysTimesheet.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); }
protected void Page_Load(object sender, EventArgs e) { try { if (Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; } _lblError.Text = string.Empty; if (!IsPostBack) { BindUsers(); if (DisplayPopup == false) { _divCancel.Visible = false; _trCloseLink.Style["display"] = "none"; } else { _modalpopupAttendees.CancelControlID = _btnCancel.ClientID; _pnlOrganiseUsers.Style.Add("display", "none"); _trCloseLink.Style["display"] = ""; } if (_singleUserSelect) // can only select a single user { _hiddenSingleOrMultiple.Value = "single"; _btnAddAll.Visible = false; _divAddAll.Visible = false; _btnRemoveAll.Visible = false; _divRemoveAll.Visible = false; } else // can select multiple users { _hiddenSingleOrMultiple.Value = "multi"; _btnAddAll.Visible = true; _divAddAll.Visible = true; _btnRemoveAll.Visible = true; _divRemoveAll.Visible = true; } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } }
public void ImportDocumentTemplate(string path) { LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon("msh", "4Dv4nc3d"); var documentTemplate = new ImportDocumentTemplate(); documentTemplate.Import(path); }
public void ExportDocumentTemplate(int[] docs, string path) { LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon("msh", "4Dv4nc3d"); var documentTemplate = new ExportDocumentTemplate(); documentTemplate.Export(docs, path); }
private Guid GetUserLogonID(string userName, string password) { Guid logonId; LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon(userName, password); logonId = returnValue.LogonId; return logonId; }
private Guid GetUserLogonID(string userName, string password) { Guid logonId; LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon(userName, password); logonId = returnValue.LogonId; return(logonId); }
public void ImportAgenda(string path) { LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon("msh", "4Dv4nc3d"); var agenda = new ImportAgenda(); agenda.Import(path); }
public void ExportAgendasByClHeaderIds(Guid[] clHeaderIds, string path) { LogonService oLogonService = new LogonService(); LogonReturnValue returnValue = new LogonReturnValue(); returnValue = oLogonService.Logon("msh", "4Dv4nc3d"); var agenda = new ExportAgenda(); agenda.Export(clHeaderIds, path); }
protected void Page_Load(object sender, EventArgs e) { if (Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); return; } if (_mapHide) { _ucMap.Visible = false; } logonUser = (LogonReturnValue)Session[SessionName.LogonSettings]; _logonId = logonUser.LogonId; //Javascript error is thrown if we use more than one address control on a pg which checks for data changed //Created a property to disable datachanged check when not required if (_isDataChangedCheckRequired) { ScriptManager.RegisterStartupScript(this, typeof(UserControl), "DataChanged", "function SetDataChanged(){document.getElementById('" + _hfIsDataChanged.ClientID + "').value = true;}", true); } else { ScriptManager.RegisterStartupScript(this, typeof(UserControl), "DataChanged", "function SetDataChanged(){}", true); } _mpePostcodeLookup.OnOkScript = string.Format("javascript:if(OkClickOnOnlineAddressVerification('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}')) SetDataChanged(); ", _listAddress.ClientID, _txtHouseNumber.ClientID, _txtPostcode.ClientID, _txtHouseName.ClientID , _txtAddress1.ClientID, _txtTown.ClientID, _txtCounty.ClientID, _txtCountry.ClientID, _txtDeptLoc.ClientID, _txtAddress2.ClientID, _txtAddress3.ClientID, _ccLastVerifiedDate.DateTextBoxClientID); _btnAddressLookup.Visible = logonUser.IsPostCodeLookupEnabled; _trLastVerified.Visible = logonUser.IsPostCodeLookupEnabled; if (Request["__EVENTARGUMENT"] != null && Request["__EVENTARGUMENT"] == "DBmove") { int idx = _listAddress.SelectedIndex; string _listValue = _listAddress.SelectedValue; if (_listValue != string.Empty) { string[] listSplit = _listValue.Split(new char[] { '~' }); if (listSplit[1] != string.Empty) { PostcodeLookup(listSplit[1], listSplit[0]); } } } _listAddress.Attributes.Add("ondblclick", Page.ClientScript.GetPostBackEventReference(_listAddress, "DBmove")); }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; if (!IsPostBack) { _txtCurrentPassword.Text = ""; _txtConfirmNewPassword.Text = ""; _txtNewPassword.Text = ""; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; //Set the page size for the grid _grdContactDetails.PageSize = 11;// Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { DisplayContactDetails(); SetControlAccessibility(); } }
protected void _btnLogin_Click(object sender, EventArgs e) { LogonServiceClient _logonService = null; try { _logonService = new LogonServiceClient(); LogonReturnValue returnValue = _logonService.Logon(_txtUsername.Text.Trim(), _txtPassword.Text.Trim()); if (!returnValue.Success) { _lblError.Text = returnValue.Message; return; } if (returnValue.UserType != 1) { _lblError.Text = "Access Denied"; return; } Session[SessionName.LogonId] = returnValue.LogonId; Session[SessionName.MemberId] = returnValue.MemberId; Session[SessionName.DefaultFeeEarner] = returnValue.UserDefaultFeeMemberId; Response.Redirect("~/Pages/Time/AddTimeEntryMobile.aspx"); } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; _logonService = null; return; } catch (Exception ex) { _lblError.Text = ex.Message; _logonService = null; return; } finally { if (_logonService != null) { if (_logonService.State != System.ServiceModel.CommunicationState.Faulted) { _logonService.Close(); } } } }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { BindUnauthorisedChequeRequests(); _btnAuthorise.Attributes.Add("onclick", "return confirm('Are you sure you wish to authorise?');"); _btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you wish to delete?');"); } }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; if (Request.QueryString["edit"] != "true") { _divBtnAddNew.Visible = false; } else { _divReset.Visible = false; } if (!IsPostBack) { // Sets controls with default values SetDefaults(); if (Session[SessionName.ProjectId] != null) { ViewState["ChequeRequestProjectId"] = new Guid(HttpContext.Current.Session[SessionName.ProjectId].ToString()); } if (Session[SessionName.ChequeRequestId] != null) { _hdnOfficeChequeRequestId.Value = Convert.ToString(Session[SessionName.ChequeRequestId]); LoadOfficeChequeRequestDetails(); _cliMatDetails.DisableClientMatter = true; _editMode = true; Session[SessionName.ChequeRequestId] = null; } else { _editMode = false; _hdnOfficeChequeRequestId.Value = "0"; ViewState["ChequeRequestProjectId"] = DataConstants.DummyGuid.ToString(); ViewState["MemberId"] = DataConstants.DummyGuid.ToString(); } HideUnhideVATDetails(); // Sets posting period and error messages for posting date SetPostingPeriod(); } if (HttpContext.Current.Session["ClientRef"] != null) { //_ddlBank.SelectedIndex = 1; } }
/// <summary> /// Page loads /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; //Set the page size for the grids _grdSearchServiceList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); _grdSearchServiceContactList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { BindIndustries(); SetIndustry(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; } Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetNoStore(); }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.CssClass = "errorMessage"; _lblError.Text = string.Empty; if (!IsPostBack) { _txtAttendees.ReadOnly = true; BindReminderState(); BindReminderBeforeTime(); ResetControls(); if (Session[SessionName.AppointmentId] != null) { _divNew.Visible = true; _divBackButton.Visible = true; _hdnAppointmentId.Value = Convert.ToString(Session[SessionName.AppointmentId]); LoadAppointmentDetails(); Session[SessionName.AppointmentId] = null; _divAppointments.Visible = false; } else { _divAppointments.Visible = true; _divNew.Visible = false; _hdnAppointmentId.Value = "0"; _divBackButton.Visible = false; _ccDate.DateText = DateTime.Now.ToString("dd/MM/yyyy"); GetDefaultFeeEarnerDetails(); _AppointmentOU.CurrentUsers = _txtAttendees.Text; _AppointmentOU.CurrentUsersID = _hdnAttendeesMemberId.Value; _cliMatDetails.SetSession = true; if (!string.IsNullOrEmpty(Convert.ToString(Session[SessionName.ProjectId]))) { _hdnProjectId.Value = Convert.ToString(Session[SessionName.ProjectId]); } } } }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { // Resets message label if "SuccessMesage" session is null. _lblError.Text = string.Empty; // Success message if contact saved successfully. if (Session["SuccessMesage"] != null) { _lblError.CssClass = "successMessage"; _lblError.Text = Convert.ToString(Session["SuccessMesage"]); Session["SuccessMesage"] = null; } _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _ddlContactType.Attributes.Add("onchange", "javascript:HideUnhideControlsOnContactType('" + _ddlContactType.ClientID + "');"); _ddlServiceType.Attributes.Add("onchange", "javascript:return HideUnhideContactTypeonServiceType('" + _ddlServiceType.ClientID + "');"); HideUnhideContactTypeonServiceType(); if (!Page.IsPostBack) { _tblConflictCheck.Style["display"] = "none"; BindTitleDropDown(); BindIndustries(); // Sets display property for table defined for conflict check. _tblConflictCheck.Style["display"] = "none"; } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; _lblError.CssClass = "errorMessage"; } catch (Exception ex) { _lblError.CssClass = "errorMessage"; _lblError.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { _lblMessage.Text = string.Empty; if (HttpContext.Current.Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; } _hdnUserType.Value = ((int)_logonSettings.UserType).ToString(); _pnlSearchCriteria.Visible = ShowCriteria; //Set the page size for the grids _grdSearchMatterList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { if (HttpContext.Current.Session[SessionName.ClientName] != null) { _clientSearch.SearchText = Convert.ToString(HttpContext.Current.Session[SessionName.ClientName]); } BindDeptDropDownList(); BindBranchDropDownList(); BindEarnerDropDownList(); BindWorkTypeDropDownList(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; } if (!IsPostBack) { _pnlCancellation.Style["display"] = "none"; BindReasonType(); BindCategoryType(); } }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; // Clear previous messages _lblMessage.Text = string.Empty; if (!IsPostBack) { SetDefaults(); // Binds grids if project id is in session if (Session[SessionName.ProjectId] != null) { Guid projectId = (Guid)Session[SessionName.ProjectId]; SetVat(projectId); BindGrids(); } // Validates the posting period on page load SetPostingPeriod(); } _txtTotalCost.Attributes.Add("readonly", "readonly"); } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; return; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); return; } _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; if (!IsPostBack) { BindTitle(); BindSex(); } } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; if (_logonSettings.UserType == 2) { ((ILBHomePage)Page.Master).DisplayClientMatterDetailsInContext(); } if (!Page.IsPostBack) { try { _lblHomePageText.Text = GetText(); } catch (Exception ex) { _lblError.Text = ex.Message; _lblError.CssClass = "errorMessage"; } } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; try { if (!IsPostBack) { GetBranches(); GetFeeEarners(); GetClientBanks(); GetOfficeBanks(); GetSupervisors(); GetCourtTypes(); //If a client is in context then use that client as the default client for the matter if (Session[SessionName.MemberId] != null && Session[SessionName.OrganisationId] != null) { _clientSearch.SearchText = Session[SessionName.ClientName].ToString(); SetupClient(); } SetupUserDefaults(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { // If Session is expired, do not execute further code. if (Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; } if (!IsPostBack) { _lblUsername.Text = "User : "******"/Pages/Password/ChangePassword.aspx"; if (_logonSettings.UserType == (int)DataConstants.UserType.Staff) { _lnkChangePassword.Visible = false; } this.LegalHomeLink.HRef = Solicitors.Branding.Strings.LawBusinessHomePageUrl; this.LegalHomeLink.InnerText = string.Format("{0} Home", Solicitors.Branding.Strings.DivisionName); this._HypLnkFeedback.Text = string.Format("Feedback to {0}", Solicitors.Branding.Strings.DivisionName); this.LegalCopyrightLink.HRef = Solicitors.Branding.Strings.LawBusinessHomePageUrl; this.LegalCopyrightLink.InnerText = Solicitors.Branding.Strings.CopyrightNotice; }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { if (Session[SessionName.ChequeRequestId] == null) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = "Please provide an Client Cheque RequestId"; return; } else { _hdnClientChequeRequestId.Value = Convert.ToString(Session[SessionName.ChequeRequestId]); LoadControls(Convert.ToInt32(_hdnClientChequeRequestId.Value)); // After printing cheque request should be zero for adding new cheque request. Session[SessionName.ChequeRequestId] = null; } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
/// <summary> /// Loads page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (!IsPostBack) { if (Session[SessionName.ChequeRequestId] == null) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = "Please provide an Office Cheque RequestId"; return; } else { _hdnOfficeChequeRequestId.Value = Convert.ToString(Session[SessionName.ChequeRequestId]); LoadControls(Convert.ToInt32(_hdnOfficeChequeRequestId.Value)); // After printing cheque request should be zero for adding new cheque request. Session[SessionName.ChequeRequestId] = null; } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblMessage.Text = string.Empty; if (Request.QueryString["edit"] != "true") { _divBtnAddNew.Visible = false; } if (!IsPostBack) { try { //Edit time entry if (Session[SessionName.TimeId] != null && Session[SessionName.MatterReference] != null) { int timeId = Convert.ToInt32(Session[SessionName.TimeId]); string matterReference = Session[SessionName.MatterReference].ToString(); //Store the timeId as its required for updating ViewState["TimeId"] = timeId; LoadTimeEntry(timeId, matterReference); } else if (Session[SessionName.ProjectId] != null) { //if a project id is in context then get the time types GetTimeTypes((Guid)Session[SessionName.ProjectId]); SetDefaultTimeType(); } //if we are coming from the Additional Detail pg then display the entered values if (Request.UrlReferrer != null) { string pageName = Request.UrlReferrer.AbsolutePath; pageName = AppFunctions.GetPageNameByUrl(pageName); if (pageName == "AdditionalTimeDetails.aspx") { // Load Last saved time entry LoadLastSavedTimeEntry(); return; } } Session[SessionName.TimeDetails] = null; } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } finally { //Clear session values after loading the time entry so that the time entry page //does not open in edit mode the next time the user visits the time recording pg. Session[SessionName.TimeId] = null; Session[SessionName.MatterReference] = null; } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; } //Set the page size for the grids _grdSearchClientList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); this._lnkClientSelect.Text = this.LinkText; if (AddAsLink) { this._modalpopupClientSearch.TargetControlID = "_lnkClientSelect"; this._lnkClientSelect.Visible = true; this._imgTextControl.Width = 1; this._imgTextControl.Height = 1; this._txtClientReference.Visible = false; } else { this._modalpopupClientSearch.TargetControlID = "_imgTextControl"; this._lnkClientSelect.Visible = false; // this._txtClientReference.Visible = true; this._imgTextControl.Width = 20; this._imgTextControl.Height = 20; } if (_logonSettings.UserType == (int)DataConstants.UserType.Client) { this._lnkClientSelect.Visible = false; _imgTextControl.Visible = false; } if (_hideLoading) { _pnlUpdateProgressClientSearch.Visible = false; } if (_width100pc) { _tbSearch.Width = "100%"; } if (!IsPostBack) { //Add readonly attribute to controls whose value can be modified through javascript //We cannot retrieve the client side changes to the value if we add this attribute in the markup _txtClientReference.Attributes.Add("readonly", "readonly"); if (EnableValidation == false) { _pnlValidation.Visible = false; } //Disply the selected client's name or reference if (DisplayClientName) { _txtClientReference.CssClass = "textBox"; } else { _txtClientReference.CssClass = "textBoxSmall"; } if (DisplayPopup == false) { _divCancelButton.Visible = false; _trCloseLink.Style["display"] = "none"; } else { _modalpopupClientSearch.CancelControlID = _btnCancel.ClientID; _ClientSearchContainer.Style.Add("display", "none"); //_pnlClientSearch.Style.Add("display", "none"); _trCloseLink.Style["display"] = ""; //_tbSearch.Style.Add("width", "620px"); } if (!this.AddAsLink) _txtClientReference.Visible = _displayClientNameTextbox; else _txtClientReference.Visible = false; BindPartner(); ShowHideMattersLink(); } _lblMessage.Text = string.Empty; }
protected void Page_Load(object sender, EventArgs e) { //User is not logged in redirect to the login page if (HttpContext.Current.Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; //Set the page size for the grids _grdSearchServiceList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); _grdSearchServiceContactList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { //Add readonly attribute to controls whose value can be modified through javascript //We cannot retrieve the client side changes to the value if we add this attribute in the markup _txtService.Attributes.Add("readonly", "readonly"); BindIndustries(); SetIndustry(); //Show/Hide the textbox which displays the currently selected service/service contact _txtService.Visible = _displayServiceContactTextbox; //Check if service selection is mandatory or not if (EnableValidation) { //selected service textbox must always be display if the service is a mandatory field //as the error message is displayed as a tooltip on the textbox _txtService.Visible = true; } else { //Disable validation if service is not mandatory _pnlValidation.Visible = false; _spnMandatory.Visible = false; } //Display the search in a modal popup if required if (_displayPopup == false) { _divCancelButton.Visible = false; _trCloseLink.Style["display"] = "none"; } else { _modalpopupServiceSearch.CancelControlID = _btnCancel.ClientID; _pnlServiceSearch.Style.Add("display", "none"); _trCloseLink.Style["display"] = ""; } //If contacts for the service need to be displayed then add a new column which will allow //the user to select a service to view the contacts if (_displayServiceContactGridview) { _grdSearchServiceList.Columns[0].Visible = true; } else { _grdSearchServiceList.Columns[0].Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session[SessionName.LogonSettings] == null) { Response.Redirect("~/Login.aspx?SessionExpired=1", true); } else { _logonSettings = (LogonReturnValue)HttpContext.Current.Session[SessionName.LogonSettings]; } _message = string.Empty; //enable/disable the validators _rfvMatter.Enabled = EnableValidation; _clientSearch.EnableValidation = EnableValidation; objPerm = (Dictionary<string, bool>)Session[SessionName.ControlSettings]; _divResetCliMatter.Visible = objPerm[SessionName.SearchClientVisible]; if (Request.QueryString["PrintPage"] != null) { _divResetCliMatter.Visible = false; _clientSearch.Visible = false; } if (!IsPostBack) { if (_setSession) { if (HttpContext.Current.Session[SessionName.ClientRef] != null) { if (Request.QueryString["PrintPage"] != null) { _txtReference.Text = HttpContext.Current.Session[SessionName.ClientRef].ToString(); _txtReference.Visible = true; _clientSearch.Visible = false; } else { _clientSearch.SearchText = HttpContext.Current.Session[SessionName.ClientRef].ToString(); _linkClientName.Text = Convert.ToString(HttpContext.Current.Session[SessionName.ClientName]); } } if (HttpContext.Current.Session[SessionName.OrganisationId] != null && HttpContext.Current.Session[SessionName.MemberId] != null) { Guid memberId = (Guid)HttpContext.Current.Session[SessionName.MemberId]; if (memberId == DataConstants.DummyGuid) { _isClientMember = false; } else { _isClientMember = true; } LoadClientMatterDetails(); } } else { if (_loadData) { _clientSearch.SetSession = false; _clientSearch.SearchText = _clientSearch.ClientRef; _linkClientName.Text = _clientSearch.ClientName; if (_memberId == DataConstants.DummyGuid) { _isClientMember = false; } else { _isClientMember = true; } LoadClientMatterDetailsWithoutUsingSession(); } } } }
protected void Page_Load(object sender, EventArgs e) { try { _btnPrint.Attributes.Add("onclick", "javascript:window.open('editclient.aspx?PrintPage=true&view=Client&mydetails=" + Request.QueryString["mydetails"] + "', 'Report', 'height=500,width=700,scrollbars=1,status=no,toolbar=no,menubar=no,location=no');return false;"); //if logonId not present redirect to Login page _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; //User type Client not allowed to search for clients _hdnUserType.Value = _logonSettings.UserType.ToString(); //Assign the logon settings value to Session in case user clicks MyDetails page if (Request.QueryString["mydetails"] == "true") { if (_logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { _memberId = _logonSettings.MemberId; _organisationId = _logonSettings.OrganisationId; } else { Session[SessionName.MemberId] = _logonSettings.MemberId; Session[SessionName.OrganisationId] = _logonSettings.OrganisationId; } } if (Request.QueryString["mydetails"] == "true" && _logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { // Do nothing } else { if (Session[SessionName.MemberId] != null && Session[SessionName.OrganisationId] != null) { _memberId = (Guid)Session[SessionName.MemberId]; _organisationId = (Guid)Session[SessionName.OrganisationId]; _pnlMatters.Visible = true; } else { //Client id is not present for editing the client //redirect to search client page Response.Redirect("SearchClient.aspx", true); } } //Clear any prev messages _lblMessage.Text = string.Empty; //Add readonly attribute to controls whose value can be modified through javascript //We cannot retrieve the client side changes to the value if we add this attribute in the markup _txtPassword.Attributes.Add("readonly", "readonly"); _txtArmedForcesNo.Attributes.Add("readonly", "readonly"); _txtUCN.Attributes.Add("readonly", "readonly"); if (_logonSettings.UserType != (int)DataConstants.UserType.ThirdParty) { //Set the page size for the grids _grdClientMatters.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); //Populate the grid } if (_logonSettings.UserType == (int)DataConstants.UserType.ThirdParty && Request.QueryString["mydetails"] == "true") { //Do Nothing } else { _grdClientMatters.DataSourceID = _odsClientMatters.ID; } if (_logonSettings.UserType != (int)DataConstants.UserType.Staff) { _divAddMatterButton.Visible = false; } if (!IsPostBack) { //Used to keep track of the addresses that are updated ViewState[UpdatedAddresses] = new List<string>(); SetControlAccessibility(); LoadClient(); //The client details should be read only for Clients and Third Party users //unless viewing their own data if (_logonSettings.UserType == (int)DataConstants.UserType.Client) { if (!(_logonSettings.MemberId == new Guid(Session[SessionName.MemberId].ToString()) && _logonSettings.OrganisationId == new Guid(Session[SessionName.OrganisationId].ToString()))) { _btnSave.Enabled = false; _divAddMatterButton.Visible = false; GenerateReadOnlyTabList(); RegisterClientScript(); } } if (_logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { if (!(Request.QueryString["mydetails"] == "true")) { _btnSave.Enabled = false; _divAddMatterButton.Visible = false; GenerateReadOnlyTabList(); RegisterClientScript(); } } //if we are coming from the search pg then display a back button if (Request.UrlReferrer != null) { string pageName = Request.UrlReferrer.AbsolutePath; pageName = AppFunctions.GetPageNameByUrl(pageName); if (pageName == "SearchClient.aspx") { _divBack.Visible = true; } } } } catch (System.ServiceModel.EndpointNotFoundException ex) { _logger.ErrorException("Endpoint not found", ex); _btnSave.Enabled = false; _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _logger.ErrorException("Could not open Edit Client page", ex); _btnSave.Enabled = false; _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.CssClass = "errorMessage"; _lblError.Text = string.Empty; if (!IsPostBack) { _txtAttendees.ReadOnly = true; BindTaskTypes(); ResetControls(); if (!string.IsNullOrEmpty(Convert.ToString(Request.QueryString["PreviousPage"]))) { ViewState["PreviousPage"] = Request.QueryString["PreviousPage"]; } if (_logonSettings.UserType == (int)DataConstants.UserType.Client || _logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { _chkExposeToThirdParties.Checked = true; _chkExposeToThirdParties.Enabled = false; } if (Session[SessionName.TaskId] != null) { _divBackButton.Visible = true; _divNew.Visible = true; _hdnTaskId.Value = Convert.ToString(Session[SessionName.TaskId]); LoadTaskDetails(); Session[SessionName.TaskId] = null; Session[SessionName.TaskProjectId] = null; } else { _divNew.Visible = false; _divBackButton.Visible = false; _hdnTaskId.Value = "0"; _ccDueDate.DateText = DateTime.Now.ToString("dd/MM/yyyy"); GetDefaultFeeEarnerDetails(); _TaskOU.CurrentUsers = _txtAttendees.Text; _TaskOU.CurrentUsersID = _hdnAttendeesMemberId.Value; _cliMatDetails.SetSession = true; } if (_logonSettings.UserType == (int)DataConstants.UserType.Client || _logonSettings.UserType == (int)DataConstants.UserType.ThirdParty) { _cliMatDetails.LoadClientMatterDetails(); _TaskOU.Visible = false; if (Session[SessionName.ProjectId] != null) { LoadMatterFeeEarner(new Guid(Convert.ToString(Session[SessionName.ProjectId]))); } } if (!string.IsNullOrEmpty(Convert.ToString(this.Session[SessionName.ProjectId]))) { this._hdnProjectId.Value = Convert.ToString(this.Session[SessionName.ProjectId]); } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; _lblError.CssClass = "errorMessage"; } catch (Exception ex) { _lblError.CssClass = "errorMessage"; _lblError.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; }
/// <summary> /// Binds a data source to the invoked server control and all its child controls. /// </summary> public override void DataBind() { logonUser = (LogonReturnValue)Session[SessionName.LogonSettings]; ClearFields(); if (_address != null) { _hfAddressId.Value = _address.Id.ToString(); _hfAddressTypeId.Value = _address.TypeId.ToString(); _txtHouseNumber.Text = _address.StreetNumber; _txtPostcode.Text = _address.PostCode; _txtHouseName.Text = _address.HouseName; _txtAddress1.Text = _address.Line1; _txtAddress2.Text = _address.Line2; _txtAddress3.Text = _address.Line3; _txtTown.Text = _address.Town; _txtCounty.Text = _address.County; _txtCountry.Text = _address.Country; _txtDXAddress1.Text = _address.DXNumber; _txtDXAddress2.Text = _address.DXTown; if (_address.Id == (int)Session[SessionName.ClientBillingAddressId]) { _chkBillAddress.Checked = true; } else { _chkBillAddress.Checked = false; } if (_address.Id == (int)Session[SessionName.ClientMailingAddressId]) { _chkMailAddress.Checked = true; } else { _chkMailAddress.Checked = false; } _txtOrganisation.Text = _address.OrganisationName; _txtDepartment.Text = _address.Department; _txtPOBox.Text = _address.PostBox; _txtSubBuildingName.Text = _address.SubBuilding; _txtDeptLoc.Text = _address.DependantLocality; _txtComment.Text = _address.Comment; if (_address.LastVerified != DataConstants.BlankDate) { _ccLastVerifiedDate.DateText = _address.LastVerified.ToString("dd/MM/yyyy"); } else { _ccLastVerifiedDate.DateText = ""; } } if (Request.QueryString["mydetails"] == "true" || logonUser.UserType == (int)DataConstants.UserType.Client) { _ucMap.Visible = false; } else { if (_txtPostcode.Text != "") { _ucMap.Address = _txtPostcode.Text; } else { _ucMap.Address = _address.PostCode; } _ucMap.Rebind(); } }
protected void Page_Load(object sender, EventArgs e) { try { _logonSettings = (LogonReturnValue)Session[SessionName.LogonSettings]; _lblError.CssClass = "errorMessage"; _lblError.Text = string.Empty; //Set the page size for the grids _grdSearchTaskList.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridViewPageSize"]); if (!IsPostBack) { _ccDateTo.DateText = DateTime.Now.ToString("dd/MM/yyyy"); BindUsers(); BindTaskStatus(); GetDefaultFeeEarnerDetails(); } } catch (System.ServiceModel.EndpointNotFoundException) { _lblError.Text = DataConstants.WSEndPointErrorMessage; } catch (Exception ex) { _lblError.Text = ex.Message; } }