protected void Page_Load(object sender, EventArgs e) { AppCode.ApplicationHelper.ClearSqlPools(); if (!IsPostBack) { string userID = Session["UserSystemID"] as string; string userName = Session["UserID"] as string; string userSource = Session["UserSource"] as string; string domainName = Session["DomainName"] as string; if (!string.IsNullOrEmpty(userID)) { AccUser.Text = "Account Balance of " + userName; accBalance.Text = "Account Balance: Rs. " + Helper.UserAccount.GetBalance(userID).ToString(); } numJobs = FileServerPrintJobProvider.ProvidePrintJobs(Session["UserID"].ToString(), userSource, domainName).Rows.Count; if (numJobs <= 0) { currentPage.Value = "CopyScan.aspx"; } else { currentPage.Value = "JobList.aspx"; } } }
/// <summary> /// Deletes the print jobs. /// </summary> private void DeletePrintJobs() { string selectedFiles = ""; if (Request.Params["options"] != null) { selectedFiles = Request.Params["options"].ToString(); } Session["__SelectedFiles"] = selectedFiles; if (string.IsNullOrEmpty(selectedFiles)) { Response.Redirect("MessageForm.aspx?FROM=JobList.aspx?CC=" + costCenterID + "&MESS=SelectJobToDelete", false); } else { try { selectedFiles = selectedFiles.Replace(".prn", ".config"); object[] selectedFileList = selectedFiles.Split(",".ToCharArray()); FileServerPrintJobProvider.DeletePrintJobs(Session["UserID"].ToString(), userSource, selectedFileList, domainName); Session["__SelectedFiles"] = null; Response.Redirect("MessageForm.aspx?FROM=JobList.aspx?CC=" + costCenterID + "&MESS=DeleteJobSuccess", false); } catch (Exception) { Response.Redirect("MessageForm.aspx?FROM=JobList.aspx?CC=" + costCenterID + "&MESS=DeleteJobFailed"); throw; } } DisplayJobList(); }
/// <summary> /// Inserts the print job to data base. /// </summary> /// <param name="selectedPrintJobs">The selected print jobs.</param> /// <remarks> /// Sequence Diagram:<br/> /// <img src="SequenceDiagrams/SD_DataManagerDevice.Jobs.InsertPrintJobToDataBase.jpg"/> /// </remarks> public static string InsertPrintJobToDataBase(string userId, string userSource, string selectedPrintJobs, string domainName) { string returnValue = string.Empty; Hashtable currentJobs = new Hashtable(); if (!string.IsNullOrEmpty(selectedPrintJobs)) { string insertQuery = string.Empty; string[] printedFileList = selectedPrintJobs.Split(",".ToCharArray()); for (int fileIndex = 0; fileIndex < printedFileList.Length; fileIndex++) { string currentPrintFile = printedFileList[fileIndex].Trim(); string jobName = FileServerPrintJobProvider.ProvideJobName(userId, userSource, currentPrintFile, domainName); insertQuery = "insert into T_CURRENT_JOBS(JOB_NAME,JOB_DATE)values(N'" + jobName.Replace("'", "''") + "',getdate())"; currentJobs.Add(fileIndex, insertQuery); } // Delete the Current Print jobs which are older than 15 Minutes currentJobs.Add("Delete", "delete from T_CURRENT_JOBS where JOB_DATE < DATEADD(mi,-15,getdate())"); using (Database dbInsertCurrentJobs = new Database()) { returnValue = dbInsertCurrentJobs.ExecuteNonQuery(currentJobs); } } return(returnValue); }
/// <summary> /// Gets the printed file. /// </summary> /// <param name="userId">User id.</param> /// <param name="jobId">Job id.</param> /// <returns></returns> /// <remarks> /// Sequence Diagram:<br/> /// <img src="SequenceDiagrams/SD_PrintReleaseDevice.GetFileData.GetPrintedFile.jpg"/> /// </remarks> public string ProvidePrintedFile(string userId, string jobId) { string finalSettingsPath = string.Empty; Session["IsSettingChanged"] = null; try { if (Session["NewPrintSettings"] != null) { DataTable prinSettings = Session["NewPrintSettings"] as DataTable; Dictionary <string, string> prinSettingsDictionary = new Dictionary <string, string>(); string duplexDirection = ""; string driverType = ""; string pagesCount = ""; int macDefaultCopies = 1; bool isCollate = false; for (int settingIndex = 0; settingIndex < prinSettings.Rows.Count; settingIndex++) { if (prinSettings.Rows[settingIndex]["CATEGORY"].ToString() == "PRINTERDRIVER") { prinSettingsDictionary.Add(prinSettings.Rows[settingIndex]["KEY"].ToString(), prinSettings.Rows[settingIndex]["VALUE"].ToString().ToString()); } if (prinSettings.Rows[settingIndex]["CATEGORY"].ToString() == "PDLSETTING") { duplexDirection = prinSettings.Rows[settingIndex]["KEY"].ToString(); } if (prinSettings.Rows[settingIndex]["KEY"].ToString() == "DriverType") { driverType = prinSettings.Rows[settingIndex]["VALUE"].ToString(); } if (prinSettings.Rows[settingIndex]["CATEGORY"].ToString() == "ISCOLLATE") { isCollate = Convert.ToBoolean(prinSettings.Rows[settingIndex]["VALUE"]); } if (prinSettings.Rows[settingIndex]["CATEGORY"].ToString() == "ISPAGESCOUNT") { pagesCount = Convert.ToString(prinSettings.Rows[settingIndex]["VALUE"]); } } jobId = jobId.Replace(".prn", ".config"); Session["IsSettingChanged"] = "Yes"; finalSettingsPath = FileServerPrintJobProvider.ProvidePrintReadyFileWithEditableSettings(prinSettingsDictionary, userId, userSource, jobId, duplexDirection, driverType, isCollate, pagesCount, macDefaultCopies, domainName); } else { Session["IsSettingChanged"] = "No"; finalSettingsPath = FileServerPrintJobProvider.ProvidePrintedFile(userId, userSource, jobId, domainName); } } catch (Exception) { //throw; } return(finalSettingsPath); }
/// <summary> /// Gets the users. /// </summary> /// <remarks> /// Sequence Diagram:<br/> /// <img src="SequenceDiagrams/SD_PrintRoverWeb.Administration.JobList.GetUsers.jpg"/> /// </remarks> private void GetUsers() { string selectedvalue = DropDownUser.SelectedValue; DropDownUser.Items.Clear(); if (userRole.Equals("user")) { ListItem liuser = new ListItem(Session["UserID"].ToString(), Session["UserID"].ToString()); DropDownUser.Items.Insert(0, liuser); DropDownUser.DataBind(); } else if (userRole.Equals("admin")) { try { string selectedSource = DropDownListUserSource.SelectedValue; if (selectedSource == Constants.USER_SOURCE_DM) { selectedSource = Constants.USER_SOURCE_AD; } if (DropDownListUserSource.SelectedValue != "DB") { domainName = DropDownListDomainName.SelectedValue; } DataTable dataTablePrintUsers = FileServerPrintJobProvider.ProvidePrintedUsers(selectedSource, domainName); if (dataTablePrintUsers != null && dataTablePrintUsers.Rows.Count > 0) { DropDownUser.DataSource = dataTablePrintUsers; DropDownUser.DataTextField = "USR_ID"; DropDownUser.DataValueField = "USR_ID"; DropDownUser.DataBind(); ListItem liall = new ListItem("All", "-1"); DropDownUser.Items.Insert(0, liall); } else { DropDownUser.Items.Clear(); ListItem liall = new ListItem("Select", "-1"); DropDownUser.Items.Insert(0, liall); } if (!string.IsNullOrEmpty(selectedvalue)) { if (DropDownUser.Items.FindByValue(selectedvalue) != null) { DropDownUser.SelectedValue = selectedvalue; } } } catch (Exception ex) { } } }
/// <summary> /// Deletes the job data. /// </summary> /// <param name="fileID">The file ID.</param> /// <param name="isDeleteJob">The is delete job.</param> private void DeleteJobData(string fileID, string isDeleteJob) { if (!string.IsNullOrEmpty(isDeleteJob)) { string selectedFiles = fileID; try { selectedFiles = selectedFiles.Replace(".prn", ".config"); object[] selectedFileList = selectedFiles.Split(",".ToCharArray()); FileServerPrintJobProvider.DeletePrintJobs(Session["UserID"].ToString(), userSource, selectedFileList, domainName); Session["deleteJobs"] = null; } catch (Exception) { throw; } } }
private void ProvideNumberOfFiles(out string printFileCount, out string printfileCountBW) { DataTable dtPrintJobsOriginalBW; DataTable dtPrintJobsOriginal; string userSource = string.Empty; string domainName = string.Empty; printfileCountBW = "0"; printFileCount = "0"; if (Session["UserSource"] == null) { string deviceIpAddress = Request.Params["REMOTE_ADDR"].ToString(); Session["UserSource"] = DataManagerDevice.ProviderDevice.Device.ProvideDeviceAuthenticationSource(deviceIpAddress); userSource = Session["UserSource"] as string; } else { userSource = Session["UserSource"] as string; } if (string.IsNullOrEmpty(domainName)) { DataSet dsCardDetails = DataManagerDevice.ProviderDevice.Users.ProvideUserDetails(Session["UserID"].ToString(), userSource); if (dsCardDetails.Tables[0].Rows.Count > 0) { domainName = dsCardDetails.Tables[0].Rows[0]["USR_DOMAIN"].ToString(); string printJobDomainName = DataManagerDevice.ProviderDevice.ApplicationSettings.ProvideDomainName(domainName); domainName = printJobDomainName; } } dtPrintJobsOriginalBW = FileServerPrintJobProvider.ProvidePrintJobsBW(Session["UserID"].ToString(), userSource, domainName); dtPrintJobsOriginal = FileServerPrintJobProvider.ProvidePrintJobs(Session["UserID"].ToString(), userSource, domainName); if (dtPrintJobsOriginalBW.Rows != null && dtPrintJobsOriginalBW.Rows.Count > 0) { printfileCountBW = dtPrintJobsOriginalBW.Rows.Count.ToString(); } if (dtPrintJobsOriginal.Rows != null && dtPrintJobsOriginal.Rows.Count > 0) { printFileCount = dtPrintJobsOriginal.Rows.Count.ToString(); } }
private void BindJoblist() { DataTable dtPrintJobsOriginal = new DataTable(); dtPrintJobsOriginal.Locale = CultureInfo.InvariantCulture; userSource = Session["UserSource"] as string; if (Session["UserSource"] == null) { string deviceIpAddress = Request.Params["REMOTE_ADDR"].ToString(); Session["UserSource"] = DataManagerDevice.ProviderDevice.Device.ProvideDeviceAuthenticationSource(deviceIpAddress); userSource = Session["UserSource"] as string; } dtPrintJobsOriginal = FileServerPrintJobProvider.ProvidePrintJobs(Session["UserID"].ToString(), userSource, domainName); GridViewJobs.DataSource = dtPrintJobsOriginal; GridViewJobs.DataBind(); GridViewJobs.Visible = true; }
/// <summary> /// Adds the AD details. /// </summary> private void AddDomainDetails() { string domainController = TextBoxDomainController.Text.Trim(); string domainName = TextBoxDomainName.Text.Trim(); string domainAlias = TextBoxDomainAlias.Text.Trim(); string userName = TextBoxUserName.Text.Trim(); string password = Protector.ProvideEncryptedPassword(TextBoxPassword.Text.Trim()); string port = TextBoxPort.Text.Trim(); string attribute = DropDownListFullName.SelectedValue; // Check if Domain already exists bool isDomainExist = DataManager.Controller.Settings.IsDomainExists(domainName); if (!isDomainExist) { string addStatus = DataManager.Controller.Settings.AddActiveDirectorySettings(domainController, domainName, userName, password, port, attribute, domainAlias); if (string.IsNullOrEmpty(addStatus)) { string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "DOMAIN_SUCESS"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Success.ToString(), serverMessage.ToString(), null); } else { string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "DOMAIN_FAIL"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Error.ToString(), serverMessage.ToString(), null); } // Create Folder if Domain Added Succesfully if (string.IsNullOrEmpty(addStatus)) { // Create Folder With Domain Name in Print Jobs Folder FileServerPrintJobProvider.CreateDomainFodler(domainName); } } else { string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "DOMAIN_EXISTS"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Error.ToString(), serverMessage.ToString(), null); } }
private void DisplayJobList() { DataTable dtPrintJobsOriginal = FileServerPrintJobProvider.ProvidePrintJobs(Session["UserID"].ToString(), userSource, domainName); StringBuilder sbJobListControls = new StringBuilder(); if (dtPrintJobsOriginal != null) { int jobsCount = dtPrintJobsOriginal.Rows.Count; for (int job = 0; job < jobsCount; job++) { //sbJobListControls.Append(string.Format("<input id='menu{0}' type='text' value='{1}' />", job, dtPrintJobsOriginal.Rows[job]["NAME"].ToString())); string jobID = dtPrintJobsOriginal.Rows[job]["JOBID"].ToString(); string jobName = dtPrintJobsOriginal.Rows[job]["NAME"].ToString(); jobName = jobName.Replace('"', ' '); jobName.Trim(); string value = "Job" + job.ToString(); sbJobListControls.Append(string.Format("<option title='{0}' value='{1}' icon='id_check' readonly='false'/>", jobName, jobID)); } jobList = sbJobListControls.ToString(); } }
private static void InitiateJobRelease(DataRow drPrintJob, string serviceName) { try { if (drPrintJob != null) { bool isJobReleaseWithSettings = Convert.ToBoolean(drPrintJob["JOB_RELEASE_WITH_SETTINGS"]); bool isJobSettingsChanged = Convert.ToBoolean(drPrintJob["JOB_RELEASE_WITH_SETTINGS"]); if (isJobReleaseWithSettings == true && isJobSettingsChanged == true) { string settings = drPrintJob["JOB_SETTINGS_REQUEST"].ToString(); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(settings); DataTable dtSettings = (DataTable)Deserialize(xmlDocument.DocumentElement, typeof(DataTable)); Dictionary <string, string> prinSettingsDictionary = new Dictionary <string, string>(); string userID = drPrintJob["USER_ID"].ToString(); string userSource = drPrintJob["USER_SOURCE"].ToString(); string jobID = drPrintJob["JOB_ID"].ToString(); string userDomain = drPrintJob["USER_DOMAIN"].ToString(); string duplexDirection = ""; string driverType = ""; string pagesCount = ""; int macDefaultCopies = 1; bool isCollate = false; for (int settingIndex = 0; settingIndex < dtSettings.Rows.Count; settingIndex++) { if (dtSettings.Rows[settingIndex]["CATEGORY"].ToString() == "PRINTERDRIVER") { prinSettingsDictionary.Add(dtSettings.Rows[settingIndex]["KEY"].ToString(), dtSettings.Rows[settingIndex]["VALUE"].ToString()); } if (dtSettings.Rows[settingIndex]["CATEGORY"].ToString() == "PDLSETTING") { duplexDirection = dtSettings.Rows[settingIndex]["KEY"].ToString(); } if (dtSettings.Rows[settingIndex]["KEY"].ToString() == "DriverType") { driverType = dtSettings.Rows[settingIndex]["VALUE"].ToString(); } if (dtSettings.Rows[settingIndex]["KEY"].ToString() == "MacDefaultCopies") { macDefaultCopies = int.Parse(dtSettings.Rows[settingIndex]["VALUE"].ToString()); } if (dtSettings.Rows[settingIndex]["CATEGORY"].ToString() == "ISCOLLATE") { isCollate = Convert.ToBoolean(dtSettings.Rows[settingIndex]["VALUE"]); } if (dtSettings.Rows[settingIndex]["CATEGORY"].ToString() == "ISPAGESCOUNT") { pagesCount = Convert.ToString(dtSettings.Rows[settingIndex]["VALUE"]); } } jobID = jobID.Replace(".prn", ".config"); var tskPrepareJobFile = Task.Factory.StartNew <string>(() => FileServerPrintJobProvider.ProvidePrintReadyFileWithEditableSettings(prinSettingsDictionary, userID, userSource, jobID, duplexDirection, driverType, isCollate, pagesCount, macDefaultCopies, userDomain)); var jobFilePath = tskPrepareJobFile.Result; //if (!string.IsNullOrEmpty(jobFilePath)) { var tskTransferFile = Task.Factory.ContinueWhenAll(new Task[] { tskPrepareJobFile }, (t) => TransferFiletoFTP(serviceName, drPrintJob, jobFilePath)); } } else { var tskTransferFile = Task.Factory.StartNew(() => TransferFiletoFTP(serviceName, drPrintJob, null)); //TransferFiletoFTP(serviceName, drPrintJob, null); } } } catch (Exception ex) { LogManager.RecordMessage(serviceName, "InitiateJobRelease", LogManager.MessageType.Exception, ex.Message, "Restart the Print Data Provider Service", ex.Message, ex.StackTrace); string sqlQuery = "update T_PRINT_JOBS set JOB_PRINT_RELEASED = 'false' where REC_SYSID = '" + drPrintJob["REC_SYSID"].ToString() + "'"; using (Database database = new Database()) { database.ExecuteNonQuery(database.GetSqlStringCommand(sqlQuery)); } } }
/// <summary> /// Handles the Click event of the ImageButtonDelete control. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/>Instance containing the event data.</param> /// <remarks> /// Sequence Diagram:<br/> /// <img src="SequenceDiagrams/SD_PrintRoverWeb.Administration.JobList.ImageButtonDelete_Click.jpg"/> /// </remarks> protected void ImageButtonDelete_Click(object sender, EventArgs e) { try { if (!_isRefresh) { string auditMessage = string.Empty; string selectedUserName = string.Empty; string auditorSuccessMessage = "User " + Convert.ToString(Session["UserID"], CultureInfo.CurrentCulture) + ", Jobs(s) deleted successfully"; string auditorFailureMessage = "User " + Convert.ToString(Session["UserID"], CultureInfo.CurrentCulture) + ", Failed to delete Jobs(s)"; string auditorSource = HostIP.GetHostIP(); string messageOwner = Convert.ToString(Session["UserID"], CultureInfo.CurrentCulture); string selectedFiles1 = Request.Form["__JOBLIST"] as string; string selectedFiles = string.Empty; int userId = 0; int userName = 1; int selectedJobsCont; if (selectedFiles1 == "" && selectedFiles1 == null) { return; } string[] arrayJoblist = selectedFiles1.Split(",".ToCharArray()); if (isReleaseJobsFromWeb.ToLower() != "yes") { selectedJobsCont = arrayJoblist.Length / 2; } else { selectedJobsCont = arrayJoblist.Length; } try { for (int i = 0; i < selectedJobsCont; i++) { if (i != 0) { userId = userId + 2; userName = userName + 2; } if (isReleaseJobsFromWeb.ToLower() == "yes") { selectedUserName = DropDownUser.SelectedValue; } else { selectedUserName = arrayJoblist[userName]; } selectedFiles = arrayJoblist[userId]; selectedFiles = selectedFiles.Replace(".prn", ".config"); object[] selectedFileList = selectedFiles.Split(",".ToCharArray()); string selectedSource = DropDownListUserSource.SelectedValue; if (selectedSource == Constants.USER_SOURCE_DM) { selectedSource = Constants.USER_SOURCE_AD; } FileServerPrintJobProvider.DeletePrintJobs(selectedUserName, selectedSource, selectedFileList, domainName); } LogManager.RecordMessage(auditorSource, Session["UserID"] as string, LogManager.MessageType.Success, auditorSuccessMessage); string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "JOBS_DELETED_SUCESS"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Success.ToString(), serverMessage, null); } catch (Exception ex) { LogManager.RecordMessage(auditorSource, Session["UserID"] as string, LogManager.MessageType.Exception, ex.Message, null, ex.Message, ex.StackTrace); string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "JOBS_DELETED_FAIL"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Error.ToString(), serverMessage, null); } GetJobList(); } else { GetJobList(); } } catch { } }
/// <summary> /// Gets the job list. /// </summary> /// <remarks> /// Sequence Diagram:<br/> /// <img src="SequenceDiagrams/SD_PrintRoverWeb.Administration.JobList.GetJobList.jpg"/> /// </remarks> private void GetJobList() { string selectedUser = DropDownUser.SelectedValue; string selectedSource = DropDownListUserSource.SelectedValue; if (selectedSource == Constants.USER_SOURCE_DM) { selectedSource = Constants.USER_SOURCE_AD; } if (IsServiceLive()) { DataTable dtJobList = null; if (DropDownListUserSource.SelectedValue != "DB") { domainName = DropDownListDomainName.SelectedValue; } if (selectedUser.Equals("-1")) { dtJobList = FileServerPrintJobProvider.ProvideAllPrintJobs(selectedSource, domainName); } else { dtJobList = FileServerPrintJobProvider.ProvidePrintJobs(selectedUser, selectedSource, domainName); } int slno = 0; if (dtJobList != null) { LabelNoJobs.Visible = false; for (int row = 0; row < dtJobList.Rows.Count; row++) { TableRow trJoblist = new TableRow(); AppController.StyleTheme.SetGridRowStyle(trJoblist); TableCell tdSlNo = new TableCell(); tdSlNo.Text = Convert.ToString(slno + 1, CultureInfo.CurrentCulture); tdSlNo.HorizontalAlign = HorizontalAlign.Left; TableCell tdUsername = new TableCell(); tdUsername.Text = dtJobList.Rows[row]["USERID"].ToString(); tdUsername.CssClass = "GridLeftAlign"; tdUsername.Attributes.Add("onclick", "togall(" + slno + ")"); TableCell tdJobName = new TableCell(); string filename = dtJobList.Rows[row]["NAME"].ToString(); filename = filename.Replace('"', ' '); filename.Trim(); tdJobName.Text = filename; tdJobName.Attributes.Add("onclick", "togall(" + slno + ")"); tdJobName.CssClass = "GridLeftAlign"; TableCell tdcreateddate = new TableCell(); DateTime jobDate = Convert.ToDateTime(dtJobList.Rows[row]["DATE"]); string currentCulture = Session["SelectedCulture"] as string; tdcreateddate.Text = string.Format(CultureInfo.CreateSpecificCulture(currentCulture), "{0:g}", jobDate); tdcreateddate.CssClass = "GridLeftAlign"; tdcreateddate.Attributes.Add("onclick", "togall(" + slno + ")"); TableCell tdJobcheck = new TableCell(); string jobId = dtJobList.Rows[row]["JOBID"].ToString(); string userId = dtJobList.Rows[row]["USERID"].ToString(); if (isReleaseJobsFromWeb.ToLower() == "yes") { tdJobcheck.Text = "<input type='checkbox' name='__JOBLIST' value='" + jobId + "' onclick='javascript:ValidateSelectedCount()'/>"; } else { tdJobcheck.Text = "<input type='checkbox' name='__JOBLIST' value='" + jobId + "," + userId + "' onclick='javascript:ValidateSelectedCount()'/>"; } tdJobcheck.HorizontalAlign = HorizontalAlign.Left; trJoblist.Cells.Add(tdJobcheck); trJoblist.Cells.Add(tdSlNo); trJoblist.Cells.Add(tdUsername); trJoblist.Cells.Add(tdcreateddate); trJoblist.Cells.Add(tdJobName); TableJobList.Rows.Add(trJoblist); slno++; } HiddenJobsCount.Value = dtJobList.Rows.Count.ToString(); } if (slno == 0) { TableCellDelete.Visible = false; //ISplit.Visible = false; //TableCell7.Visible = false; //ImageButtonRefresh.Visible = false; //TableCell9.Visible = false; PanelMainData.Visible = false; TableWarningMessage.Visible = true; } else { PanelMainData.Visible = true; TableWarningMessage.Visible = false; TableCellDelete.Visible = true; // ISplit.Visible = true; //TableCell7.Visible = true; //ImageButtonRefresh.Visible = true; //TableCell9.Visible = true; } recordsCount = slno; } else { TableCellDelete.Visible = false; //ISplit.Visible = false; //TableCell7.Visible = false; //ImageButtonRefresh.Visible = false; //TableCell9.Visible = false; string serverMessage = Localization.GetServerMessage("", Session["selectedCulture"] as string, "SERVICE_NOTRESPONDING"); GetMasterPage().DisplayActionMessage(AppLibrary.MessageType.Error.ToString(), serverMessage, null); } }