public TemplateGenevaReport(JobsSelector _jobSelector, XmlDocument _xdoc) { InitializeComponent(); jobSelector = _jobSelector; xdoc = _xdoc; ResetDates("T-1"); }
public TemplateGenevaOptionExpiry(JobsSelector _jobSelector, XmlDocument _xdoc) { InitializeComponent(); jobSelector = _jobSelector; xdoc = _xdoc; dtPE.Value = Convert.ToDateTime(DateTime.Today.ToString("MM/dd/yyyy 23:59:59")); dtExpireDate.Value = Convert.ToDateTime(DateTime.Today.ToString("MM/dd/yyyy 00:00:00")); }
public void DisplayEditor(JobsSelector _js, string xmlText, bool _isEditMode) { js = _js; isEditMode = _isEditMode; try { Clear(); ResizeEditor(); if (!xmlText.Equals(String.Empty)) { xdoc = new XmlDocument(); xdoc.LoadXml(xmlText); int row = 0; foreach (XmlNode node in xdoc.FirstChild.Attributes) { tableLayoutPanel1.RowCount = row + 1; TableLayoutPanelCellPosition posLeft = new TableLayoutPanelCellPosition(0, row); Label l = new Label(); l.Text = node.Name; l.TextAlign = ContentAlignment.MiddleLeft; l.Width = Convert.ToInt32(tableLayoutPanel1.ColumnStyles[0].Width); tableLayoutPanel1.SetCellPosition(l, posLeft); tableLayoutPanel1.Controls.Add(l); TableLayoutPanelCellPosition posRight = new TableLayoutPanelCellPosition(1, row); TextBox t = new TextBox(); t.Multiline = true; t.WordWrap = true; t.Text = node.InnerXml; t.Enabled = protectedFields.Contains(node.Name.ToLower()) ? false : true; t.Width = Convert.ToInt32(tableLayoutPanel1.Width - tableLayoutPanel1.ColumnStyles[0].Width) - 8; t.Height = Convert.ToInt32(t.Height * (1.0 +( Math.Truncate(t.TextLength / 60.0)))); tableLayoutPanel1.SetCellPosition(t, posRight); tableLayoutPanel1.Controls.Add(t); row++; } } this.Visible = true; tableLayoutPanel1.Visible = true; SetSaveVisibility(); } catch(Exception ex) { Console.Write(ex); } }
public TemplateBasic(JobsSelector _jobSelector, XmlDocument _xdoc) { InitializeComponent(); jobSelector = _jobSelector; xdoc = _xdoc; }