private ArrayList GetGridColumns(string linkFieldName) { ArrayList columns = new ArrayList(); OrderColumns(); foreach (ViewMap vm in viewMaps) { if (vm.Style != null && vm.Style == "hyperlink") { if (linkFieldName == null) { Check.VerifyNotNull(vm.PrimaryKeyName, Error.NullParameter, "PrimaryKeyName"); linkFieldName = vm.PrimaryKeyName; } HyperLinkColumn column = new HyperLinkColumn(); column.DataTextField = vm.PropertyName; column.DataNavigateUrlField = linkFieldName; column.DataNavigateUrlFormatString = vm.NavigateUrlFormat; column.HeaderText = vm.ColumnName; column.SortExpression = vm.PropertyName; column.DataTextFormatString = vm.FormatString; columns.Add(column); } else { BoundColumn column = new BoundColumn(); column.HeaderText = vm.ColumnName; column.SortExpression = vm.PropertyName; column.DataField = vm.PropertyName; column.DataFormatString = vm.FormatString; columns.Add(column); } } return(columns); }
private HyperLinkColumn createHyperLinkColumn(string dataTextField, string dataTextFormatString, string dataNavigateUrlField, string headerText, string goToReport, string param) { DateTime fromDate = DateTime.Parse(txtFromDate.Value); string fDate = fromDate.ToString("yyyyMMdd"); DateTime toDate = DateTime.Parse(txtToDate.Value); string tDate = toDate.ToString("yyyyMMdd"); HyperLinkColumn linkColumn = new HyperLinkColumn(); linkColumn.DataTextField = dataTextField; linkColumn.DataTextFormatString = dataTextFormatString; //"{0}" linkColumn.DataNavigateUrlField = dataNavigateUrlField; linkColumn.DataNavigateUrlFormatString = "AdminSectionReports.aspx?" + "order=" + txtSortOrderHidden.Text + "&sortBy=" + txtSortByColumnHidden.Text + "&pageSize=" + ddlPageSize.SelectedValue + "&fromDate=" + fDate + "&toDate=" + tDate + "&report=" + goToReport + "¶mName=" + param + "¶mValue={0}"; //"&" + param + "={0}"; linkColumn.HeaderText = headerText; linkColumn.HeaderStyle.CssClass = "AdminReportHeader DataGridFixedHeader"; return(linkColumn); }
private DataGridColumn CreateBoundColumn(DataColumn c) { string strUserID = UserContext.UserID.ToString(); string strColName = c.ColumnName; HyperLinkColumn col = new HyperLinkColumn(); col.DataTextField = strColName; col.HeaderText = strColName; //col.FooterText ="test<BR>test" ; ///* if (strColName.Length < 3) // Need to perform this check because if the column name happens to be 2 characters then will cause a system error - if < 2 char then can assume that not an "ID~" column { col.DataNavigateUrlField = c.ColumnName + "ID~"; col.DataNavigateUrlFormatString = "/Reporting/Individual/CPDHistory.aspx?ProfileID={0}&ModuleID="; } else if (strColName.Substring(strColName.Length - 3, 3) != "ID~") { // if it is the id column (determined by the last 3 idiotic characters) then hideit and also dont set the url stuff col.DataNavigateUrlField = c.ColumnName + "ID~"; col.DataNavigateUrlFormatString = "/Reporting/Individual/CPDHistory.aspx?ProfileID={0}&ModuleID="; } else // //if (strColName.Substring(strColName.Length-3,3)!="ID~") { col.Visible = false; } return(col); }
public void DefineActionsGrid() { if (this._Actions.Trim() != "" && this._Actions.Trim() != "") { GenericCLX.CS.Util objUtil = new GenericCLX.CS.Util(); //objUtil.GetConfig(""); string strProjectName = objUtil.ProjectName.Trim(); string[] arrStrActions = this._Actions.Split(chrDelimiter); string[] arrStrAcronyms = this._Acronyms.Split(chrDelimiter); for (int i = 0; i < arrStrActions.Length; i++) { if (arrStrActions[i].Trim() != "" && arrStrAcronyms[i].Trim() != "") { HyperLinkColumn objLink = new HyperLinkColumn(); objLink.Text = "<img src=\"/GenericCLX/img/" + arrStrActions[i] + ".gif\" border=\"0\" class=\"hand\">"; //objLink.Text = "<img src=\"/GenericCLX/img/new/" + arrStrActions[i] + ".ico\" border=\"0\" class=\"hand\">"; objLink.DataNavigateUrlField = this._ID; objLink.DataNavigateUrlFormatString = "javascript:redirect('" + "/" + strProjectName + "/" + this._Module + "/" + this._Title + "/" + this._Title + arrStrAcronyms[i] + ".aspx?" + this._ID + "={0}');"; //objLink.DataNavigateUrlFormatString = "javascript:popupcenter('../Includes/Pop.asp?tipo=<%=LCase(strFolder)%>&id=<%=intCount%>&titulo=<%=strTitulo%>&link=<%=strLink%>&texto=<%=strTexto%>&bgcolor=<%=strColor%>&w=190&h=83','POP<%=intCount%>',230,230,0,0); objLink.HeaderText = arrStrActions[i]; objLink.HeaderStyle.HorizontalAlign = (HorizontalAlign)2; objLink.ItemStyle.HorizontalAlign = (HorizontalAlign)2; this._Grid.Columns.Add(objLink); } } } }
private void CreateTemplateColumns(DataGrid dtg, DataTable dt) { ReportConfiguration rprt = reportConfigurations[report]; for (int c = 0; c < dt.Columns.Count; c++) { string columnName = ""; columnName = dt.Columns[c].ColumnName; ReportConfiguration.ColumnMode columnMode = rprt.ColumnDisplay(columnName); if (columnMode == ReportConfiguration.ColumnMode.ShowAsHyperLink) { ReportHyperLinkColumn hcol = rprt.GetHyperLinkColumn(columnName); HyperLinkColumn linkColumn = createHyperLinkColumn(hcol.DataTextField, hcol.DataTextFormatString, hcol.DataNavigateUrlField, hcol.HeaderText, hcol.GoToReport, hcol.Param); dtg.Columns.Add(linkColumn); } else if (columnMode == ReportConfiguration.ColumnMode.ShowAsNormal || rbAllColumns.Checked) { BoundColumn bc = new BoundColumn(); bc.DataField = columnName; bc.HeaderText = columnName; bc.SortExpression = columnName; dtg.Columns.Add(bc); } } }
protected void Page_Load(object sender, EventArgs e) { list.Read(this); GridView1.AutoGenerateColumns = false; HyperLinkColumn urlCol = new HyperLinkColumn(); urlCol.DataTextField = "Text"; urlCol.DataNavigateUrlField = "NavigateUrl"; urlCol.HeaderText = "File Name"; BoundColumn size = new BoundColumn(); size.DataField = "Size"; size.HeaderText = "Size (Bytes)"; BoundColumn mod = new BoundColumn(); mod.DataField = "Modified"; mod.HeaderText = "Last Modified"; // Add three columns to collection. GridView1.Columns.Add(urlCol); GridView1.Columns.Add(size); GridView1.Columns.Add(mod); GridView1.DataSource = list.Files; GridView1.DataBind(); }
override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // dgList.Columns.Clear(); HyperLinkColumn hlc = new HyperLinkColumn(); hlc.DataNavigateUrlField = "QuoteCode"; hlc.DataNavigateUrlFormatString = lChartPage.Text + "?" + Config.SymbolParameterName + "={0}"; hlc.DataTextField = "QuoteCode"; hlc.HeaderText = "QuoteCode"; dgList.Columns.Add(hlc); string[] ss = Config.AutoPullFormulaData.Split(';'); for (int i = 0; i < ss.Length; i++) { BoundColumn bc = new BoundColumn(); bc.DataField = Utils.GetName(ss[i]); bc.HeaderText = bc.DataField; bc.SortExpression = bc.DataField; //bc.DataFormatString = "{0:f2}"; dgList.Columns.Add(bc); } InitializeComponent(); base.OnInit(e); }
private void SetDefaults() { FundCollection funds = new FundCollection(CurrentOrganization.OrganizationID); ddlFund.DataSource = funds; ddlFund.DataTextField = "FundName"; ddlFund.DataValueField = "FundId"; ddlFund.DataBind(); ddlFund.Items.Insert(0, new ListItem("", "-1")); tbName.Focus(); btnUpdate.Enabled = _editEnabled; if (_pledgeId != -1) { Pledge pledge = new Pledge(_pledgeId); if (pledge.PledgeId != -1) { ddlFund.SelectedValue = pledge.FundId.ToString(); dtbStartDate.SelectedDate = pledge.PledgeBeginDate; dtbEndDate.SelectedDate = pledge.PledgeEndDate; lblUpdated.Text = string.Format("Added {0:c} pledge to the {1} fund for {2}", pledge.Amount, pledge.Fund.FundName, Utilities.PersonLink(pledge.Person, Convert.ToInt32(PersonDetailPageSetting))); } } HyperLinkColumn hpl = (HyperLinkColumn)dgPeople.Columns[2]; hpl.DataNavigateUrlFormatString = "~/default.aspx?page=" + PersonDetailPageSetting + "&guid={0}"; }
/// <summary> /// Loads the coupons. /// </summary> private void LoadCoupons() { CouponCollection couponCollection = new CouponController().FetchAll(); if (couponCollection.Count == 0) { Master.MessageCenter.DisplayInformationMessage(LocalizationUtility.GetText("lblNoCouponsConfigured")); dgCoupons.Visible = false; } else { dgCoupons.DataSource = couponCollection; dgCoupons.ItemDataBound += dgCoupons_ItemDataBound; HyperLinkColumn hlEditColumn = dgCoupons.Columns[0] as HyperLinkColumn; if (hlEditColumn != null) { hlEditColumn.Text = LocalizationUtility.GetText("lblEdit"); hlEditColumn.DataNavigateUrlFormatString = "~/admin/coupons.aspx?couponId={0}"; } dgCoupons.Columns[0].HeaderText = LocalizationUtility.GetText("hdrEdit"); dgCoupons.Columns[1].HeaderText = LocalizationUtility.GetText("hdrCouponCode"); dgCoupons.Columns[2].HeaderText = LocalizationUtility.GetText("hdrExpirationDate"); dgCoupons.Columns[3].HeaderText = LocalizationUtility.GetText("hdrType"); dgCoupons.Columns[4].HeaderText = LocalizationUtility.GetText("hdrDelete"); ButtonColumn btnColumn = dgCoupons.Columns[4] as ButtonColumn; if (btnColumn != null) { btnColumn.Text = LocalizationUtility.GetText("lblDelete"); } dgCoupons.DataBind(); } }
private void setReportType(string type) { if (type.Equals(ProjectItem.ItemType.TASK)) { return; } HyperLinkColumn col = new HyperLinkColumn(); col.DataTextField = "name"; col.DataNavigateUrlField = "id"; // set item type to be displayed string item = ""; if (type.Equals(ProjectItem.ItemType.PROJECT)) { item = ProjectItem.ItemType.MODULE; } else if (type.Equals(ProjectItem.ItemType.MODULE)) { item = ProjectItem.ItemType.TASK; } col.DataNavigateUrlFormatString = Request.ApplicationPath + "/PM/Projects.aspx?item=" + item + "&id={0}"; DisplayGrid.Columns.Remove(DisplayGrid.Columns[1]); DisplayGrid.Columns.AddAt(1, col); }
private DataGridColumn c_hyper_link() { HyperLinkColumn column1 = new HyperLinkColumn(); column1.DataTextField = "ID"; column1.NavigateUrl = "http://www.example.com"; return(column1); }
private DataGridColumn c_hyper_link(string se) { HyperLinkColumn column1 = new HyperLinkColumn(); column1.DataTextField = "ID"; column1.NavigateUrl = "http://www.example.com"; column1.SortExpression = se; return(column1); }
private DataGridColumn c_hyper_link(bool v) { HyperLinkColumn column1 = new HyperLinkColumn(); column1.DataTextField = "ID"; column1.NavigateUrl = "http://www.google.com"; column1.Visible = v; return(column1); }
private DataGridColumn c_hyper_link(string se) { HyperLinkColumn column1 = new HyperLinkColumn(); column1.DataTextField = "ID"; column1.NavigateUrl = "http://www.google.com"; column1.HeaderImageUrl = se; return(column1); }
protected HyperLinkColumn CreateHyperLinkColumn(string Text, string DataNavigateUrlField, string DataNavigateUrlFormatString) { HyperLinkColumn hlc = new HyperLinkColumn(); hlc.Text = Text; hlc.DataNavigateUrlField = DataNavigateUrlField; hlc.DataNavigateUrlFormatString = DataNavigateUrlFormatString; return(hlc); }
private DataGridColumn c_hyper_link(ListItemType tp, string text) { HyperLinkColumn column1 = new HyperLinkColumn(); column1.DataTextField = "ID"; column1.NavigateUrl = "http://www.google.com"; this.setStyle(column1, tp); this.setText(column1, tp, text); return(column1); }
private void Page_Load(object sender, System.EventArgs e) { //Put user code to initialize the page here System.Web.UI.HtmlControls.HtmlForm frm = (HtmlForm)this.FindControl("Form1"); GHTTestBegin(frm); GHTActiveSubTest = GHTSubTest1; try { DataGrid1.DataSource = GHTTests.GHDataSources.DSDataTable(0, 1, "http://"); HyperLinkColumn c_id = new HyperLinkColumn(); HyperLinkColumn c_name = new HyperLinkColumn(); HyperLinkColumn c_company = new HyperLinkColumn(); c_id.DataNavigateUrlField = ""; c_id.Text = "123"; c_name.DataNavigateUrlField = "Name"; c_name.Text = "123"; c_company.DataNavigateUrlField = "Company"; c_company.Text = "123"; DataGrid1.Columns.Add(c_id); DataGrid1.Columns.Add(c_name); DataGrid1.Columns.Add(c_company); DataGrid1.DataBind();; GHTSubTestAddResult(c_id.DataNavigateUrlField); GHTSubTestAddResult(c_name.DataNavigateUrlField); GHTSubTestAddResult(c_company.DataNavigateUrlField); } catch (Exception ex) { GHTSubTestUnexpectedExceptionCaught(ex); } GHTActiveSubTest = Ghtsubtest3; try { DataGrid3.DataSource = GHTTests.GHDataSources.DSDataTable(0, 1, "http://"); DataGrid3.DataBind();; GHTSubTestAddResult(((System.Web.UI.WebControls.HyperLinkColumn)DataGrid3.Columns[0]).DataNavigateUrlField); GHTSubTestAddResult(((System.Web.UI.WebControls.HyperLinkColumn)DataGrid3.Columns[1]).DataNavigateUrlField); GHTSubTestAddResult(((System.Web.UI.WebControls.HyperLinkColumn)DataGrid3.Columns[2]).DataNavigateUrlField); } catch (Exception ex) { GHTSubTestUnexpectedExceptionCaught(ex); } GHTTestEnd(); }
public void SetUpTest() { HyperLinkColumn column = new HyperLinkColumn(); Assert.AreEqual(String.Empty, column.DataNavigateUrlField, "#1"); Assert.AreEqual(String.Empty, column.DataTextField, "2"); Assert.AreEqual(String.Empty, column.DataTextFormatString, "#3"); Assert.AreEqual(String.Empty, column.NavigateUrl, "#4"); Assert.AreEqual(String.Empty, column.Target, "#5"); Assert.AreEqual(String.Empty, column.Text, "#6"); }
public override void DataBind() { HyperLinkColumn hlc = ((HyperLinkColumn)Grid.Columns[0]); hlc.DataTextField = this.NameProperty; hlc.DataNavigateUrlField = this.IdentifierProperty; hlc.DataNavigateUrlFormatString = this.UrlTemplate; Grid.ItemDataBound += new DataGridItemEventHandler(Grid_ItemDataBound); base.DataBind(); }
private DataGridColumn GetColumn(string sHeaderText, string sDataField, string sSortExpression, string sURL, string sURLData) { HyperLinkColumn oReturn = new HyperLinkColumn(); oReturn.DataNavigateUrlField = sURLData; oReturn.DataNavigateUrlFormatString = sURL; oReturn.DataTextField = sDataField; oReturn.HeaderText = sHeaderText; oReturn.SortExpression = sSortExpression; return(oReturn); }
/// <summary> /// Sets the provider list. /// </summary> private void SetProviderList() { ProviderCollection providerCollection = new ProviderController(). FetchByProviderType(this.ProviderType); if (providerCollection.Count > 0) { pnlProviderList.Visible = true; dgProviders.DataSource = providerCollection; dgProviders.ItemDataBound += new DataGridItemEventHandler(dgProviders_ItemDataBound); dgProviders.Columns[0].HeaderText = LocalizationUtility.GetText("hdrEdit"); dgProviders.Columns[1].HeaderText = LocalizationUtility.GetText("hdrName"); dgProviders.Columns[2].HeaderText = LocalizationUtility.GetText("hdrConfigurationControlPath"); dgProviders.Columns[3].HeaderText = LocalizationUtility.GetText("hdrDelete"); HyperLinkColumn hlEditColumn = dgProviders.Columns[0] as HyperLinkColumn; if (hlEditColumn != null) { hlEditColumn.Text = LocalizationUtility.GetText("lblEdit"); switch (this.ProviderType) { case ProviderType.PaymentProvider: hlEditColumn.DataNavigateUrlFormatString = "~/admin/paymentprovidermanagement.aspx?providerId={0}"; break; case ProviderType.ShippingProvider: hlEditColumn.DataNavigateUrlFormatString = "~/admin/shippingprovidermanagement.aspx?providerId={0}"; break; case ProviderType.TaxProvider: hlEditColumn.DataNavigateUrlFormatString = "~/admin/taxprovidermanagement.aspx?providerId={0}"; break; case ProviderType.CouponProvider: hlEditColumn.DataNavigateUrlFormatString = "~/admin/couponprovidermanagement.aspx?providerId={0}"; break; } } ButtonColumn btnColumn = dgProviders.Columns[3] as ButtonColumn; if (btnColumn != null) { btnColumn.Text = LocalizationUtility.GetText("lblDelete"); } dgProviders.DataBind(); } else { pnlProviderList.Visible = false; base.MasterPage.MessageCenter.DisplayInformationMessage(SetNoProvidersLabel()); } }
private void BindGrid(bool FillData = false) { string SQL = Session["PopUpSQL"].ToString(); // Warning!!! Optional parameters not supported int i = 0; HyperLinkColumn C = new HyperLinkColumn(); SqlDataAdapter daList = new SqlDataAdapter(SQL, DataTools.GetConnectionStr()); DataSet dsList = new DataSet(); if (FillData) { daList.Fill(dsList); Session["dsList"] = dsList; } else { dsList = (DataSet)Session["dsList"]; } C.HeaderText = dsList.Tables[0].Columns[i].ColumnName; C.DataNavigateUrlField = dsList.Tables[0].Columns[0].ColumnName; // C.DataNavigateUrlFormatString = "JavaScript:setTextContent(window.parent.opener.document.getElementById('txtValue'),'{0}');top.returnValue='{0}';top.window.close();" C.DataNavigateUrlFormatString = "JavaScript:window.parent.opener.setTargetField(\'{0}\');top.returnValue=\'{0}\';top.window.close();"; C.DataTextField = dsList.Tables[0].Columns[0].ColumnName; C.ItemStyle.ForeColor = System.Drawing.Color.Blue; DataGrid1.Columns.Add(C); for (i = 0; (i <= (dsList.Tables[0].Columns.Count - 1)); i++) { if ((i > 0)) { BoundColumn cln = new BoundColumn(); cln.HeaderText = dsList.Tables[0].Columns[i].ColumnName; cln.DataField = dsList.Tables[0].Columns[i].ColumnName; DataGrid1.Columns.Add(cln); } } //if ((Session[(Session.SessionID + "Language")].ToString() == "Arabic")) //{ // // pageBody.Attributes.Add("dir", "rtl") // //DataTools.Translate(DataGrid1, true); //} DataGrid1.DataSource = Session["dsList"]; DataGrid1.CurrentPageIndex = (CurrentPage - 1); DataGrid1.DataBind(); lblPageCount.Text = DataGrid1.PageCount.ToString(); lblPage.Text = (DataGrid1.CurrentPageIndex.ToString() + 1); }
public void DataNavigateUrlFieldTest() { HyperLinkColumn column = new HyperLinkColumn(); string foo = "foo"; string bar = "bar"; column.NavigateUrl = foo; Assert.AreEqual(foo, column.NavigateUrl, "#1"); // Test the bit about DataNavigateUrlField having precedence over NavigateUrl column.DataNavigateUrlField = bar; Assert.AreEqual(bar, column.DataNavigateUrlField, "#2"); // what does this mean? shouldn't NavigateUrl be "bar" now? Assert.AreEqual(foo, column.NavigateUrl, "#3"); }
override protected void OnInit(EventArgs e) { dgList.Columns.Clear(); HyperLinkColumn hlc = new HyperLinkColumn(); hlc.DataNavigateUrlField = "QuoteCode"; hlc.DataNavigateUrlFormatString = lChartPage.Text + "?" + Config.SymbolParameterName + "={0}"; hlc.DataTextField = "QuoteCode"; hlc.HeaderText = "Symbol"; dgList.Columns.Add(hlc); string[] ss = Config.AutoPullFormulaData.Split(';'); bool b = lColumn != null && lColumn.Text != ""; if (b) { ss = lColumn.Text.Split(';'); } foreach (string s in ss) { BoundColumn bc = new BoundColumn(); if (b) { int i = s.IndexOf('='); if (i > 0) { bc.DataField = s.Substring(0, i); bc.HeaderText = s.Substring(i + 1); } else { continue; } } else { bc.DataField = Utils.GetName(s); bc.HeaderText = bc.DataField; } bc.SortExpression = bc.DataField; dgList.Columns.Add(bc); } InitializeComponent(); base.OnInit(e); }
public void DefineChildsGrid() { string[] arrStrColumnsHeaderChilds = this._ColumnsHeaderChilds.Split(chrDelimiter); string[] arrStrColumnsImgChilds = this._ColumnsImgChilds.Split(chrDelimiter); string[] arrStrColumnsLinkChilds = this._ColumnsLinkChilds.Split(chrDelimiter); for (int i = 0; i < arrStrColumnsHeaderChilds.Length; i++) { HyperLinkColumn objLink = new HyperLinkColumn(); objLink.Text = "<img src=\"" + arrStrColumnsImgChilds[i] + "\" border=\"0\" class=\"hand\">"; objLink.DataNavigateUrlField = this._ID; objLink.DataNavigateUrlFormatString = "javascript:redirect('" + arrStrColumnsLinkChilds[i] + "');"; objLink.HeaderText = arrStrColumnsHeaderChilds[i]; objLink.HeaderStyle.HorizontalAlign = (HorizontalAlign)2; objLink.ItemStyle.HorizontalAlign = (HorizontalAlign)2; this._Grid.Columns.Add(objLink); } }
private void ShowList() { HyperLinkColumn hlc = (HyperLinkColumn)dgList.Columns[2]; hlc.DataNavigateUrlFormatString = "~/default.aspx?page=" + ApplicantListPageIDSetting + "&guid={0}"; dgList.Visible = true; dgList.ItemType = "Job Posting"; dgList.ItemBgColor = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false); dgList.ItemAltBgColor = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false); dgList.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false); dgList.AddEnabled = editEnabled; dgList.AddImageUrl = "~/images/add_job.gif"; dgList.DeleteEnabled = editEnabled; dgList.EditEnabled = editEnabled; dgList.EditOverride = true; dgList.MergeEnabled = false; dgList.MailEnabled = false; dgList.ExportEnabled = true; dgList.AllowSorting = true; dgList.DataSource = new JobPostingData().GetJobPostingList_DT(cbShowExternal.Checked); dgList.DataBind(); pnlDetails.Visible = false; pnlList.Visible = true; if (dgList.Items.Count > 0) { dgList.Visible = true; lbAdd.Visible = false; } else { if (editEnabled) { dgList.Visible = false; lbAdd.Visible = true; } else { pnlList.Visible = false; } } }
public override void DataBind() { if (this.disableLinks) { BoundColumn bc = (BoundColumn)Grid.Columns[1]; bc.DataField = this.NameProperty; bc.Visible = true; Grid.Columns[0].Visible = false; } else { HyperLinkColumn hlc = ((HyperLinkColumn)Grid.Columns[0]); hlc.DataTextField = this.NameProperty; hlc.DataNavigateUrlField = this.IdentifierProperty; hlc.DataNavigateUrlFormatString = this.UrlTemplate; } base.DataBind(); }
/// <summary> /// Binds the log collection. /// </summary> /// <param name="logCollection">The log collection.</param> private void BindLogCollection(LogCollection logCollection) { if (logCollection.Count > 0) { dgErrorLogListing.DataSource = logCollection; dgErrorLogListing.Columns[1].HeaderText = LocalizationUtility.GetText("hdrDetails"); dgErrorLogListing.Columns[2].HeaderText = LocalizationUtility.GetText("hdrLogDate"); dgErrorLogListing.Columns[3].HeaderText = LocalizationUtility.GetText("hdrLogLevel"); dgErrorLogListing.Columns[4].HeaderText = LocalizationUtility.GetText("hdrScriptName"); dgErrorLogListing.Columns[5].HeaderText = LocalizationUtility.GetText("hdrLogMessage"); dgErrorLogListing.Columns[6].HeaderText = LocalizationUtility.GetText("hdrRemoteHost"); HyperLinkColumn hlDetailsColumn = dgErrorLogListing.Columns[1] as HyperLinkColumn; if (hlDetailsColumn != null) { hlDetailsColumn.Text = LocalizationUtility.GetText("lblDetails"); } dgErrorLogListing.DataBind(); } else { pnlCurrentErrorLogs.Visible = false; Master.MessageCenter.DisplayInformationMessage(LocalizationUtility.GetText("lblNoErrorLogs")); } }
private void ShowList() { pnlList.Visible = true; HyperLinkColumn hlc = (HyperLinkColumn)dgApplicants.Columns[3]; hlc.DataNavigateUrlFormatString = "~/default.aspx?page=" + ApplicantDetailPageIDSetting + "&guid={0}"; dgApplicants.Visible = true; dgApplicants.ItemType = "Job Applicant"; dgApplicants.ItemBgColor = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false); dgApplicants.ItemAltBgColor = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false); dgApplicants.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false); dgApplicants.AddEnabled = false; dgApplicants.EditEnabled = false; dgApplicants.DeleteEnabled = _editEnabled; dgApplicants.EditOverride = true; dgApplicants.MergeEnabled = false; dgApplicants.MailEnabled = false; dgApplicants.ExportEnabled = true; dgApplicants.AllowSorting = true; dgApplicants.DataSource = new JobApplicantData().GetJobApplicantList_DT(int.Parse(ddlPostings.SelectedValue), cbRejectionSent.Checked, cbReviewed.Checked); dgApplicants.DataBind(); }
protected void Page_Load(object sender, System.EventArgs e) { if (this.Session["dsSeguridad"] == null) { this.Response.Redirect("~/Error.aspx?errMsg=sesion"); return; } if (!this.IsPostBack) { int PK_Persona = Convert.ToInt32(Request.QueryString["pk_persona"].ToString()); int PK_Programa = Convert.ToInt32(this.Session["pk_programa"].ToString()); this.daPersona.SelectCommand.Parameters["@PK_Persona"].Value = PK_Persona; this.daPersona.SelectCommand.Parameters["@PK_Programa"].Value = PK_Programa; this.daPersona.SelectCommand.Parameters["@IN_Raza"].Value = true; this.dsPersona.SA_PERSONA.Rows.Clear(); this.daPersona.Fill(this.dsPersona); this.DataBind(); this.Session["dsPersona"] = this.dsPersona; this.dgEpisodios.Visible = false; this.SetRazas(); if (Request.QueryString["fuente"] != null) { if (Request.QueryString["accion"].ToString() == "consultar") { this.lblMensaje.Visible = false; this.btnModificar.Visible = false; this.btnRegresar.Visible = false; } else { this.btnRegistrar.Visible = true; this.btnModificar.Visible = false; this.btnRegresar.Visible = false; } if (Request.QueryString["fuente"].ToString() == "admision") { if (!IsDead(PK_Persona.ToString()) && !HasProfileOpenInResidentialOrHospitalization(PK_Persona.ToString()) && !CheckIfEpisodeWithSameProgramOpenExists(PK_Programa) && GenderTest(PK_Programa)) { this.btnRegistrar.Visible = true; } HyperLinkColumn hlc = (HyperLinkColumn)this.dgEpisodios.Columns[0]; hlc.DataNavigateUrlFormatString = "../Episodios/frmVisualizar.aspx?pk_episodio={0}&fuente=admision"; } else if (Request.QueryString["fuente"].ToString() == "evaluacion") { HyperLinkColumn hlc = (HyperLinkColumn)this.dgEpisodios.Columns[0]; hlc.DataNavigateUrlFormatString = "../Episodios/frmVisualizar.aspx?pk_episodio={0}&fuente=evaluacion"; } else if (Request.QueryString["fuente"].ToString() == "alta") { HyperLinkColumn hlc = (HyperLinkColumn)this.dgEpisodios.Columns[0]; hlc.DataNavigateUrlFormatString = "../Episodios/frmVisualizar.aspx?pk_episodio={0}&fuente=alta"; } } else if (Request.QueryString["accion"].ToString() == "registrar") { this.btnRegistrar.Visible = false; this.btnModificar.Visible = false; this.btnRegresar.Visible = true; this.lblMsgGrid.Text = "La persona no posee episodios registrados."; } else if (Request.QueryString["accion"].ToString() == "consultar") { this.lblMensaje.Visible = false; this.btnRegistrar.Visible = false; this.btnModificar.Visible = true; this.btnRegresar.Visible = false; } } else { this.dsPersona = (ASSMCA.pacientes.dsPersona) this.Session["dsPersona"]; } this.VerTodosEpisodios(); }