public bool a(ds A_0, bool A_1) { if (this.c.ContainsKey((int) A_0)) { return this.c[(int) A_0]; } return A_1; }
public override global::System.Data.DataSet Clone() { ds cln = ((ds)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
private void Imprimir() { var pt = AppDomain.CurrentDomain.BaseDirectory + @"Helpers\Imprimir\Grafico\Cuadre.rdlc"; var ds = new ds(); DataRow N = ds.Tables["CuadreCaja"].NewRow(); N["cntFac"] = _ds.cntFAC; N["cntNCR"] = _ds.cntNCR; N["cntNEN"] = _ds.cntNEN; N["cntFacAnu"] = _ds.cntFACAnu; N["cntNCRAnu"] = _ds.cntNCRAnu; N["cntNENAnu"] = _ds.cntNENAnu; N["montoFac"] = _ds.montoFAC; N["montoFacAnu"] = _ds.montoFACAnu; N["montoNCR"] = _ds.montoNCR; N["montoNCRAnu"] = _ds.montoNCRAnu; N["montoNEN"] = _ds.montoNEN; N["montoNENAnu"] = _ds.montoNENAnu; N["montoVenta"] = _ds.montoVenta; N["montoVentaContado"] = _ds.montoVentaContado; N["montoVentaCredito"] = _ds.montoVentaCredito; N["efectivo_s"] = _ds.efectivo_s; N["divisa_s"] = _ds.divisa_s; N["electronico_s"] = _ds.electronico_s; N["otros_s"] = _ds.otros_s; N["devolucion_s"] = _ds.devoluciones_s; N["credito_s"] = _ds.credito_s; N["cambio_s"] = _ds.cambio_s; N["efectivo_u"] = _ds.efectivo_u; N["divisa_u"] = _ds.divisa_u; N["electronico_u"] = _ds.electronico_u; N["otros_u"] = _ds.otros_u; N["cnt_efectivo_s"] = _ds.cnt_efectivo_s; N["cnt_divisa_s"] = _ds.cnt_divisa_s; N["cnt_electronico_s"] = _ds.cnt_electronico_s; N["cnt_otros_s"] = _ds.cnt_otros_s; N["cnt_divisa_u"] = _ds.cnt_divisa_u; N["cuadre_s"] = _ds.cuadre_s; N["cuadre_u"] = _ds.cuadre_u; ds.Tables["CuadreCaja"].Rows.Add(N); var Rds = new List <ReportDataSource>(); var pmt = new List <ReportParameter>(); Rds.Add(new ReportDataSource("CuadreCaja", ds.Tables["CuadreCaja"])); var frp = new ReporteFrm(); frp.rds = Rds; frp.prmts = pmt; frp.Path = pt; frp.ShowDialog(); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { ds ds = new ds(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
private void loadTables(string from, string desiredSKU, string refreshfromWebRts, string refreshfromWebTxs) { dataset = new ds(); client = new localhost.SPWS(); //load rates DataTable dt = client.LoadRates(from, string.Empty, string.Empty, refreshfromWebRts); DataTable destiny = dataset.Rates; TableTools.Merge(dt, destiny); //load txs DataTable txs = client.LoadTransactions(from, desiredSKU, string.Empty, string.Empty, refreshfromWebTxs); destiny = dataset.Transactions; TableTools.Merge(txs, destiny); //load totals txs = client.LoadTransactions(from, desiredSKU, "y", string.Empty, "n"); destiny = dataset.TransactionsTotals; TableTools.Merge(txs, destiny); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); ds ds = new ds(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "dataDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
internal static ds.TopicRow NewTopic(ds.FeedRow feed) { ds.TopicRow row = topics.NewTopicRow(); row.Author = ""; row.BookId = 0; row.Content = ""; row.FeedId = feed.Id; row.Guid = ""; row.IsDeleted = false; row.IsRead = false; row.Link = ""; row.PubDate = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; row.Title = ""; return row; }
static string M(ds d) { return("b"); }
private void Imprimir() { var pt = AppDomain.CurrentDomain.BaseDirectory + @"Helpers\Imprimir\Grafico\Documento.rdlc"; var ds = new ds(); var factor = _ds.encabezado.FactorCambio; //NEGOCIO DataRow N = ds.Tables["DatosNegocio"].NewRow(); N["Nombre"] = _ds.negocio.Nombre; N["CiRif"] = _ds.negocio.CiRif; N["Direccion"] = _ds.negocio.Direccion; ds.Tables["DatosNegocio"].Rows.Add(N); //ENCABEZADO DataRow E = ds.Tables["Encabezado"].NewRow(); E["NombreCli"] = _ds.encabezado.NombreCli; E["DireccionCli"] = _ds.encabezado.DireccionCli; E["CiRifCli"] = _ds.encabezado.CiRifCli; E["CodigoCli"] = _ds.encabezado.CodigoCli; E["DocNombre"] = _ds.encabezado.DocumentoNombre; E["DocNro"] = _ds.encabezado.DocumentoNro; E["DocFecha"] = _ds.encabezado.DocumentoFecha; E["SubTotal"] = _ds.encabezado.SubTotalItemFull; E["Descuento"] = _ds.encabezado.Descuento; E["Total"] = _ds.encabezado.Total; E["TotalDivisa"] = _ds.encabezado.TotalDivisa; ds.Tables["Encabezado"].Rows.Add(E); //ITEMS foreach (var rg in _ds.item) { DataRow p = ds.Tables["Item"].NewRow(); p["NombrePrd"] = rg.NombrePrd; p["CodigoPrd"] = rg.CodigoPrd; p["Cantidad"] = rg.Cantidad; p["Empaque"] = rg.Empaque + Environment.NewLine + "( " + rg.Contenido.ToString().Trim() + " )"; p["Deposito"] = rg.DepositoDesc; p["Precio"] = rg.PrecioFull; p["PrecioDivisa"] = rg.PrecioFull / factor; p["Importe"] = rg.ImporteFull; p["ImporteDivisa"] = rg.ImporteDivisa / factor; p["TotalUnd"] = rg.TotalUnd; ds.Tables["Item"].Rows.Add(p); } var Rds = new List <ReportDataSource>(); var pmt = new List <ReportParameter>(); Rds.Add(new ReportDataSource("DatosNegocio", ds.Tables["DatosNegocio"])); Rds.Add(new ReportDataSource("Encabezado", ds.Tables["Encabezado"])); Rds.Add(new ReportDataSource("Item", ds.Tables["Item"])); var frp = new ReporteFrm(); frp.rds = Rds; frp.prmts = pmt; frp.Path = pt; frp.ShowDialog(); }
private void InitializeComponent() { this.components = (IContainer) new Container(); this.panel1 = new Panel(); this.button3 = new Button(); this.button2 = new Button(); this.button1 = new Button(); this.panel2 = new Panel(); this.button4 = new Button(); this.button5 = new Button(); this.gridControl1 = new GridControl(); this.contextMenuStrip1 = new ContextMenuStrip(this.components); this.toolStripMenuItem1 = new ToolStripMenuItem(); this.toolStripMenuItem2 = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.toolStripMenuItem3 = new ToolStripMenuItem(); this.ds1 = new ds(); this.gridView1 = new GridView(); this.coliddestanation = new GridColumn(); this.colname = new GridColumn(); this.colcomment = new GridColumn(); this.coldestanationgroup = new GridColumn(); this.colnumpos = new GridColumn(); this.colpyramyd_name = new GridColumn(); this.repositoryItemButtonEdit1 = new RepositoryItemButtonEdit(); this.coladdint1 = new GridColumn(); this.coladdint2 = new GridColumn(); this.coladdint3 = new GridColumn(); this.coladdnum1 = new GridColumn(); this.coladdnum2 = new GridColumn(); this.coladdnum3 = new GridColumn(); this.coladdstr1 = new GridColumn(); this.coladdstr2 = new GridColumn(); this.coladdstr3 = new GridColumn(); this.colpyrgrouping = new GridColumn(); this.repositoryItemLookUpEdit2 = new RepositoryItemLookUpEdit(); this.colidpreference = new GridColumn(); this.repositoryItemLookUpEdit3 = new RepositoryItemLookUpEdit(); this.colroutes = new GridColumn(); this.repositoryItemPopupContainerEdit1 = new RepositoryItemPopupContainerEdit(); this.popupContainerControl1 = new PopupContainerControl(); this.checkedListBox1 = new CheckedListBox(); this.treeView2 = new TreeView(); this.repositoryItemComboBox1 = new RepositoryItemComboBox(); this.repositoryItemCalcEdit1 = new RepositoryItemCalcEdit(); this.repositoryItemLookUpEdit1 = new RepositoryItemLookUpEdit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.gridControl1.BeginInit(); this.contextMenuStrip1.SuspendLayout(); this.ds1.BeginInit(); this.gridView1.BeginInit(); this.repositoryItemButtonEdit1.BeginInit(); this.repositoryItemLookUpEdit2.BeginInit(); this.repositoryItemLookUpEdit3.BeginInit(); this.repositoryItemPopupContainerEdit1.BeginInit(); this.popupContainerControl1.BeginInit(); this.popupContainerControl1.SuspendLayout(); this.repositoryItemComboBox1.BeginInit(); this.repositoryItemCalcEdit1.BeginInit(); this.repositoryItemLookUpEdit1.BeginInit(); this.SuspendLayout(); this.panel1.Controls.Add((Control)this.button3); this.panel1.Controls.Add((Control)this.button2); this.panel1.Controls.Add((Control)this.button1); this.panel1.Dock = DockStyle.Bottom; this.panel1.Location = new Point(0, 453); this.panel1.Name = "panel1"; this.panel1.Size = new Size(1068, 33); this.panel1.TabIndex = 1; this.button3.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button3.FlatStyle = FlatStyle.Flat; this.button3.Location = new Point(981, 5); this.button3.Name = "button3"; this.button3.Size = new Size(75, 23); this.button3.TabIndex = 2; this.button3.Text = "Закрыть"; this.button3.Click += new EventHandler(this.button3_Click); this.button2.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button2.FlatStyle = FlatStyle.Flat; this.button2.Location = new Point(900, 5); this.button2.Name = "button2"; this.button2.Size = new Size(75, 23); this.button2.TabIndex = 1; this.button2.Text = "Отменить"; this.button2.Click += new EventHandler(this.button2_Click); this.button1.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button1.FlatStyle = FlatStyle.Flat; this.button1.Location = new Point(819, 5); this.button1.Name = "button1"; this.button1.Size = new Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "Применить"; this.button1.Click += new EventHandler(this.button1_Click); this.panel2.Controls.Add((Control)this.button4); this.panel2.Controls.Add((Control)this.button5); this.panel2.Dock = DockStyle.Bottom; this.panel2.Location = new Point(0, 420); this.panel2.Name = "panel2"; this.panel2.Size = new Size(1068, 33); this.panel2.TabIndex = 3; this.panel2.Visible = false; this.button4.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button4.DialogResult = DialogResult.Cancel; this.button4.FlatStyle = FlatStyle.Flat; this.button4.Location = new Point(981, 5); this.button4.Name = "button4"; this.button4.Size = new Size(75, 23); this.button4.TabIndex = 2; this.button4.Text = "Отмена"; this.button5.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button5.DialogResult = DialogResult.OK; this.button5.FlatStyle = FlatStyle.Flat; this.button5.Location = new Point(900, 5); this.button5.Name = "button5"; this.button5.Size = new Size(75, 23); this.button5.TabIndex = 1; this.button5.Text = "Выбрать"; this.gridControl1.ContextMenuStrip = this.contextMenuStrip1; this.gridControl1.DataMember = "destanation"; this.gridControl1.DataSource = (object)this.ds1; this.gridControl1.Dock = DockStyle.Fill; this.gridControl1.EmbeddedNavigator.Name = ""; this.gridControl1.Location = new Point(0, 0); this.gridControl1.LookAndFeel.Style = LookAndFeelStyle.Flat; this.gridControl1.LookAndFeel.UseDefaultLookAndFeel = false; this.gridControl1.MainView = (BaseView)this.gridView1; this.gridControl1.Name = "gridControl1"; this.gridControl1.RepositoryItems.AddRange(new RepositoryItem[7] { (RepositoryItem)this.repositoryItemComboBox1, (RepositoryItem)this.repositoryItemButtonEdit1, (RepositoryItem)this.repositoryItemCalcEdit1, (RepositoryItem)this.repositoryItemLookUpEdit1, (RepositoryItem)this.repositoryItemLookUpEdit2, (RepositoryItem)this.repositoryItemLookUpEdit3, (RepositoryItem)this.repositoryItemPopupContainerEdit1 }); this.gridControl1.Size = new Size(1068, 420); this.gridControl1.TabIndex = 4; this.gridControl1.ViewCollection.AddRange(new BaseView[1] { (BaseView)this.gridView1 }); this.contextMenuStrip1.Items.AddRange(new ToolStripItem[4] { (ToolStripItem)this.toolStripMenuItem1, (ToolStripItem)this.toolStripMenuItem2, (ToolStripItem)this.toolStripSeparator1, (ToolStripItem)this.toolStripMenuItem3 }); this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Size = new Size(147, 76); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new Size(146, 22); this.toolStripMenuItem1.Text = "Добавить"; this.toolStripMenuItem1.Click += new EventHandler(this.toolStripMenuItem1_Click); this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Size = new Size(146, 22); this.toolStripMenuItem2.Text = "Дублировать"; this.toolStripMenuItem2.Click += new EventHandler(this.toolStripMenuItem2_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new Size(143, 6); this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Size = new Size(146, 22); this.toolStripMenuItem3.Text = "Удалить"; this.toolStripMenuItem3.Click += new EventHandler(this.toolStripMenuItem3_Click); this.ds1.DataSetName = "ds"; this.ds1.EnforceConstraints = false; this.ds1.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema; this.gridView1.Appearance.FocusedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.FocusedRow.BackColor2 = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.FocusedRow.BorderColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.FocusedRow.ForeColor = Color.Black; this.gridView1.Appearance.FocusedRow.Options.UseBackColor = true; this.gridView1.Appearance.FocusedRow.Options.UseBorderColor = true; this.gridView1.Appearance.FocusedRow.Options.UseForeColor = true; this.gridView1.Appearance.GroupPanel.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.GroupPanel.BackColor2 = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView1.Appearance.GroupPanel.Options.UseBackColor = true; this.gridView1.Appearance.HideSelectionRow.BackColor = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView1.Appearance.HideSelectionRow.BackColor2 = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView1.Appearance.HideSelectionRow.BorderColor = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView1.Appearance.HideSelectionRow.ForeColor = Color.Black; this.gridView1.Appearance.HideSelectionRow.Options.UseBackColor = true; this.gridView1.Appearance.HideSelectionRow.Options.UseBorderColor = true; this.gridView1.Appearance.HideSelectionRow.Options.UseForeColor = true; this.gridView1.Appearance.SelectedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.SelectedRow.BackColor2 = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.SelectedRow.BorderColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView1.Appearance.SelectedRow.ForeColor = Color.Black; this.gridView1.Appearance.SelectedRow.Options.UseBackColor = true; this.gridView1.Appearance.SelectedRow.Options.UseBorderColor = true; this.gridView1.Appearance.SelectedRow.Options.UseForeColor = true; this.gridView1.BorderStyle = BorderStyles.Simple; this.gridView1.Columns.AddRange(new GridColumn[18] { this.coliddestanation, this.colname, this.colcomment, this.coldestanationgroup, this.colnumpos, this.colpyramyd_name, this.coladdint1, this.coladdint2, this.coladdint3, this.coladdnum1, this.coladdnum2, this.coladdnum3, this.coladdstr1, this.coladdstr2, this.coladdstr3, this.colpyrgrouping, this.colidpreference, this.colroutes }); this.gridView1.GridControl = this.gridControl1; this.gridView1.GroupPanelText = "Панель группировки"; this.gridView1.Name = "gridView1"; this.gridView1.OptionsCustomization.AllowFilter = false; this.gridView1.OptionsDetail.ShowDetailTabs = false; this.gridView1.OptionsLayout.StoreVisualOptions = false; this.gridView1.OptionsNavigation.AutoFocusNewRow = true; this.gridView1.OptionsView.ShowAutoFilterRow = true; this.gridView1.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never; this.gridView1.OptionsView.ShowIndicator = false; this.coliddestanation.Caption = "#"; this.coliddestanation.FieldName = "iddestanation"; this.coliddestanation.Name = "coliddestanation"; this.coliddestanation.OptionsColumn.AllowEdit = false; this.coliddestanation.Visible = true; this.coliddestanation.VisibleIndex = 5; this.coliddestanation.Width = 61; this.colname.Caption = "Наименование"; this.colname.FieldName = "name"; this.colname.Name = "colname"; this.colname.Visible = true; this.colname.VisibleIndex = 2; this.colname.Width = 243; this.colcomment.Caption = "Описание"; this.colcomment.FieldName = "comment"; this.colcomment.Name = "colcomment"; this.colcomment.Visible = true; this.colcomment.VisibleIndex = 4; this.colcomment.Width = 179; this.coldestanationgroup.Caption = "Группа"; this.coldestanationgroup.FieldName = "destanationgroup"; this.coldestanationgroup.Name = "coldestanationgroup"; this.coldestanationgroup.Visible = true; this.coldestanationgroup.VisibleIndex = 1; this.coldestanationgroup.Width = 108; this.colnumpos.Caption = "№пп"; this.colnumpos.FieldName = "numpos"; this.colnumpos.Name = "colnumpos"; this.colnumpos.Visible = true; this.colnumpos.VisibleIndex = 0; this.colnumpos.Width = 57; this.colpyramyd_name.Caption = "Пирамиды"; this.colpyramyd_name.ColumnEdit = (RepositoryItem)this.repositoryItemButtonEdit1; this.colpyramyd_name.FieldName = "pyramid_name"; this.colpyramyd_name.Name = "colpyramyd_name"; this.colpyramyd_name.Visible = true; this.colpyramyd_name.VisibleIndex = 3; this.colpyramyd_name.Width = 98; this.repositoryItemButtonEdit1.AutoHeight = false; this.repositoryItemButtonEdit1.Buttons.AddRange(new EditorButton[1] { new EditorButton() }); this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; this.coladdint1.Caption = "Доп. ц. число1"; this.coladdint1.FieldName = "addint1"; this.coladdint1.Name = "coladdint1"; this.coladdint1.Visible = true; this.coladdint1.VisibleIndex = 6; this.coladdint2.Caption = "Доп. ц. число2"; this.coladdint2.FieldName = "addint2"; this.coladdint2.Name = "coladdint2"; this.coladdint2.Visible = true; this.coladdint2.VisibleIndex = 7; this.coladdint3.Caption = "Доп. ц. число3"; this.coladdint3.FieldName = "addint3"; this.coladdint3.Name = "coladdint3"; this.coladdint3.Visible = true; this.coladdint3.VisibleIndex = 8; this.coladdnum1.Caption = "Доп. число1"; this.coladdnum1.FieldName = "addnum1"; this.coladdnum1.Name = "coladdnum1"; this.coladdnum1.Visible = true; this.coladdnum1.VisibleIndex = 9; this.coladdnum2.Caption = "Доп. число2"; this.coladdnum2.FieldName = "addnum2"; this.coladdnum2.Name = "coladdnum2"; this.coladdnum2.Visible = true; this.coladdnum2.VisibleIndex = 10; this.coladdnum3.Caption = "Доп. число3"; this.coladdnum3.FieldName = "addnum3"; this.coladdnum3.Name = "coladdnum3"; this.coladdnum3.Visible = true; this.coladdnum3.VisibleIndex = 11; this.coladdstr1.Caption = "Доп. строка1"; this.coladdstr1.FieldName = "addstr1"; this.coladdstr1.Name = "coladdstr1"; this.coladdstr1.Visible = true; this.coladdstr1.VisibleIndex = 12; this.coladdstr2.Caption = "Доп. строка2"; this.coladdstr2.FieldName = "addstr2"; this.coladdstr2.Name = "coladdstr2"; this.coladdstr2.Visible = true; this.coladdstr2.VisibleIndex = 13; this.coladdstr3.Caption = "Доп. строка3"; this.coladdstr3.FieldName = "addstr3"; this.coladdstr3.Name = "coladdstr3"; this.coladdstr3.Visible = true; this.coladdstr3.VisibleIndex = 14; this.colpyrgrouping.Caption = "Группировка пирамид"; this.colpyrgrouping.ColumnEdit = (RepositoryItem)this.repositoryItemLookUpEdit2; this.colpyrgrouping.FieldName = "pyrgrouping"; this.colpyrgrouping.Name = "colpyrgrouping"; this.colpyrgrouping.Visible = true; this.colpyrgrouping.VisibleIndex = 15; this.repositoryItemLookUpEdit2.AutoHeight = false; this.repositoryItemLookUpEdit2.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemLookUpEdit2.Columns.AddRange(new LookUpColumnInfo[1] { new LookUpColumnInfo("name", "Значение", 20, FormatType.None, "", true, HorzAlignment.Default, ColumnSortOrder.None) }); this.repositoryItemLookUpEdit2.Name = "repositoryItemLookUpEdit2"; this.colidpreference.Caption = "Настройки плана"; this.colidpreference.ColumnEdit = (RepositoryItem)this.repositoryItemLookUpEdit3; this.colidpreference.FieldName = "idpreference"; this.colidpreference.Name = "colidpreference"; this.colidpreference.Visible = true; this.colidpreference.VisibleIndex = 16; this.repositoryItemLookUpEdit3.AutoHeight = false; this.repositoryItemLookUpEdit3.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemLookUpEdit3.Columns.AddRange(new LookUpColumnInfo[1] { new LookUpColumnInfo("name", "Наименование", 20, FormatType.None, "", true, HorzAlignment.Default, ColumnSortOrder.None) }); this.repositoryItemLookUpEdit3.Name = "repositoryItemLookUpEdit3"; this.colroutes.Caption = "Группы маршрутов"; this.colroutes.ColumnEdit = (RepositoryItem)this.repositoryItemPopupContainerEdit1; this.colroutes.FieldName = "iddestanation"; this.colroutes.Name = "colroutes"; this.colroutes.Visible = true; this.colroutes.VisibleIndex = 17; this.repositoryItemPopupContainerEdit1.AutoHeight = false; this.repositoryItemPopupContainerEdit1.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemPopupContainerEdit1.Name = "repositoryItemPopupContainerEdit1"; this.repositoryItemPopupContainerEdit1.PopupControl = this.popupContainerControl1; this.repositoryItemPopupContainerEdit1.Popup += new EventHandler(this.repositoryItemPopupContainerEdit1_Popup); this.repositoryItemPopupContainerEdit1.QueryDisplayText += new QueryDisplayTextEventHandler(this.repositoryItemPopupContainerEdit1_QueryDisplayText); this.repositoryItemPopupContainerEdit1.QueryResultValue += new QueryResultValueEventHandler(this.repositoryItemPopupContainerEdit1_QueryResultValue); this.repositoryItemPopupContainerEdit1.QueryPopUp += new CancelEventHandler(this.repositoryItemPopupContainerEdit1_QueryPopUp); this.popupContainerControl1.Controls.Add((Control)this.checkedListBox1); this.popupContainerControl1.Controls.Add((Control)this.treeView2); this.popupContainerControl1.Location = new Point(435, 128); this.popupContainerControl1.Name = "popupContainerControl1"; this.popupContainerControl1.Size = new Size(198, 231); this.popupContainerControl1.TabIndex = 9; this.checkedListBox1.Dock = DockStyle.Fill; this.checkedListBox1.FormattingEnabled = true; this.checkedListBox1.Location = new Point(0, 0); this.checkedListBox1.Name = "checkedListBox1"; this.checkedListBox1.Size = new Size(198, 229); this.checkedListBox1.TabIndex = 2; this.treeView2.BorderStyle = BorderStyle.None; this.treeView2.Dock = DockStyle.Fill; this.treeView2.Location = new Point(0, 0); this.treeView2.Name = "treeView2"; this.treeView2.Size = new Size(198, 231); this.treeView2.TabIndex = 1; this.repositoryItemComboBox1.AutoHeight = false; this.repositoryItemComboBox1.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; this.repositoryItemCalcEdit1.AutoHeight = false; this.repositoryItemCalcEdit1.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemCalcEdit1.Name = "repositoryItemCalcEdit1"; this.repositoryItemLookUpEdit1.AutoHeight = false; this.repositoryItemLookUpEdit1.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemLookUpEdit1.Columns.AddRange(new LookUpColumnInfo[1] { new LookUpColumnInfo("name", "Наименование", 20, FormatType.None, "", true, HorzAlignment.Default, ColumnSortOrder.None) }); this.repositoryItemLookUpEdit1.Name = "repositoryItemLookUpEdit1"; this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.Controls.Add((Control)this.popupContainerControl1); this.Controls.Add((Control)this.gridControl1); this.Controls.Add((Control)this.panel2); this.Controls.Add((Control)this.panel1); this.Name = "DestanationForm"; this.Size = new Size(1068, 486); this.Text = "Маршруты"; this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); this.gridControl1.EndInit(); this.contextMenuStrip1.ResumeLayout(false); this.ds1.EndInit(); this.gridView1.EndInit(); this.repositoryItemButtonEdit1.EndInit(); this.repositoryItemLookUpEdit2.EndInit(); this.repositoryItemLookUpEdit3.EndInit(); this.repositoryItemPopupContainerEdit1.EndInit(); this.popupContainerControl1.EndInit(); this.popupContainerControl1.ResumeLayout(false); this.repositoryItemComboBox1.EndInit(); this.repositoryItemCalcEdit1.EndInit(); this.repositoryItemLookUpEdit1.EndInit(); this.ResumeLayout(false); }
private void Imprimir() { var pt = AppDomain.CurrentDomain.BaseDirectory + @"Helpers\Imprimir\Grafico\Documento.rdlc"; var ds = new ds(); var factor = _ds.encabezado.FactorCambio; //NEGOCIO DataRow N = ds.Tables["DatosNegocio"].NewRow(); N["Nombre"] = _ds.negocio.Nombre; N["CiRif"] = _ds.negocio.CiRif; N["Direccion"] = _ds.negocio.Direccion; ds.Tables["DatosNegocio"].Rows.Add(N); //ENCABEZADO DataRow E = ds.Tables["Encabezado"].NewRow(); E["NombreCli"] = _ds.encabezado.NombreCli; E["DireccionCli"] = _ds.encabezado.DireccionCli; E["CiRifCli"] = _ds.encabezado.CiRifCli; E["CodigoCli"] = _ds.encabezado.CodigoCli; E["DocNombre"] = _ds.encabezado.DocumentoNombre; E["DocNro"] = _ds.encabezado.DocumentoNro; E["DocFecha"] = _ds.encabezado.DocumentoFecha; E["SubTotalNeto"] = _ds.encabezado.SubTotalNeto; E["DescuentoNeto"] = _ds.encabezado.DescuentoNeto; E["CargoNeto"] = _ds.encabezado.CargoNeto; E["Descuento"] = _ds.encabezado.Descuento; E["Cargo"] = _ds.encabezado.Cargo; E["Total"] = _ds.encabezado.Total; E["TotalDivisa"] = _ds.encabezado.TotalDivisa; E["Iva"] = _ds.encabezado.MontoIva; E["Base"] = _ds.encabezado.MontoBase; E["Exento"] = _ds.encabezado.MontoExento; E["Notas"] = _ds.encabezado.Notas; E["SubTotal2"] = (_ds.encabezado.SubTotal - _ds.encabezado.Descuento + _ds.encabezado.Cargo); E["SubTotalNeto2"] = (_ds.encabezado.SubTotalNeto - _ds.encabezado.DescuentoNeto + _ds.encabezado.CargoNeto); E["TextoDescuento"] = "Descuento (" + _ds.encabezado.DescuentoPorct.ToString("n2") + "%)"; E["TextoCargo"] = "Cargo (" + _ds.encabezado.CargoPorct.ToString("n2") + "%)"; E["factorCambio"] = _ds.encabezado.FactorCambio; E["montoBase1"] = _ds.encabezado.MontoBase1; E["montoBase2"] = _ds.encabezado.MontoBase2; E["montoBase3"] = _ds.encabezado.MontoBase3; E["montoIva1"] = _ds.encabezado.MontoIva1; E["montoIva2"] = _ds.encabezado.MontoIva2; E["montoIva3"] = _ds.encabezado.MontoIva3; E["tasa1"] = _ds.encabezado.Tasa1; E["tasa2"] = _ds.encabezado.Tasa2; E["tasa3"] = _ds.encabezado.Tasa3; E["textoBase1"] = "Monto Base (" + _ds.encabezado.Tasa1.ToString("n2") + "%): "; E["textoBase2"] = "Monto Base (" + _ds.encabezado.Tasa2.ToString("n2") + "%): "; E["textoBase3"] = "Monto Base (" + _ds.encabezado.Tasa3.ToString("n2") + "%): "; ds.Tables["Encabezado"].Rows.Add(E); //ITEM foreach (var rg in _ds.item) { DataRow p = ds.Tables["Item"].NewRow(); p["NombrePrd"] = rg.NombrePrd; p["CodigoPrd"] = rg.CodigoPrd; p["Cantidad"] = rg.Cantidad; p["Empaque"] = rg.Empaque + Environment.NewLine + "( " + rg.Contenido.ToString().Trim() + " )"; p["Deposito"] = rg.DepositoDesc; p["Precio"] = rg.Precio; p["PrecioDivisa"] = rg.PrecioDivisa / factor; p["Importe"] = rg.Importe; p["ImporteDivisa"] = rg.ImporteDivisa / factor; p["TotalUnd"] = rg.TotalUnd; ds.Tables["Item"].Rows.Add(p); } var Rds = new List <ReportDataSource>(); var pmt = new List <ReportParameter>(); Rds.Add(new ReportDataSource("DatosNegocio", ds.Tables["DatosNegocio"])); Rds.Add(new ReportDataSource("Encabezado", ds.Tables["Encabezado"])); Rds.Add(new ReportDataSource("Item", ds.Tables["Item"])); var frp = new ReporteFrm(); frp.rds = Rds; frp.prmts = pmt; frp.Path = pt; frp.ShowDialog(); }
public FeedForm(ds.FeedRow feedRow ) { Row = feedRow; InitializeComponent(); this.AutoValidate = System.Windows.Forms.AutoValidate.Disable; }
public static void SaveFeed(ds.FeedRow feed) { try { using (dsTableAdapters.FeedTableAdapter ta = new dsTableAdapters.FeedTableAdapter()) { if (feed.Id == 0) { feeds.AddFeedRow(feed); } ta.Update(feed); ta.Fill(feeds); } } catch { var dr = feeds.GetErrors(); if (dr.Length > 0) { Notificator.NotifyMessage(dr[0].RowError); } throw; } }
public bool a(ds A_0) { return this.c.ContainsKey((int) A_0); }
internal static DataTable GetTopics(ds.FeedRow feed) { try { using (dsTableAdapters.TopicTableAdapter ta = new dsTableAdapters.TopicTableAdapter()) { if(feed.ShowRead) ta.FillBy(topics, feed.Id); else ta.FillUnread(topics, feed.Id); return topics; } } catch { var dr = feeds.GetErrors(); if (dr.Length > 0) { Notificator.NotifyMessage(dr[0].RowError); } throw; } }
SingleChannelView.DataContext = new ECGMonitorViewModel(ds, ss, devs);
static string M (ds d) { return "b"; }
private void InitializeComponent() { this.components = (IContainer) new Container(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ColorForm)); this.panel1 = new Panel(); this.button3 = new Button(); this.button2 = new Button(); this.button1 = new Button(); this.gridControl6 = new GridControl(); this.contextMenuStrip1 = new ContextMenuStrip(this.components); this.toolStripMenuItem1 = new ToolStripMenuItem(); this.toolStripMenuItem2 = new ToolStripMenuItem(); this.toolStripSeparator2 = new ToolStripSeparator(); this.toolStripMenuItem7 = new ToolStripMenuItem(); this.ds = new ds(); this.gridView6 = new GridView(); this.colname = new GridColumn(); this.colcomment = new GridColumn(); this.colcolor1 = new GridColumn(); this.repositoryItemColorEdit1 = new RepositoryItemColorEdit(); this.colcolorgroup = new GridColumn(); this.colwindraw = new GridColumn(); this.colshortname = new GridColumn(); this.colidcolorgroup = new GridColumn(); this.colnumpos = new GridColumn(); this.treeList1 = new TreeList(); this.treeListColumn1 = new TreeListColumn(); this.treeListColumn2 = new TreeListColumn(); this.repositoryItemCheckEdit1 = new RepositoryItemCheckEdit(); this.treeListColumn3 = new TreeListColumn(); this.contextMenuStrip2 = new ContextMenuStrip(this.components); this.toolStripMenuItem3 = new ToolStripMenuItem(); this.toolStripMenuItem4 = new ToolStripMenuItem(); this.toolStripMenuItem5 = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.toolStripMenuItem6 = new ToolStripMenuItem(); this.imageList1 = new ImageList(this.components); this.splitterControl1 = new SplitterControl(); this.panel1.SuspendLayout(); this.gridControl6.BeginInit(); this.contextMenuStrip1.SuspendLayout(); this.ds.BeginInit(); this.gridView6.BeginInit(); this.repositoryItemColorEdit1.BeginInit(); this.treeList1.BeginInit(); this.repositoryItemCheckEdit1.BeginInit(); this.contextMenuStrip2.SuspendLayout(); this.SuspendLayout(); this.panel1.Controls.Add((Control)this.button3); this.panel1.Controls.Add((Control)this.button2); this.panel1.Controls.Add((Control)this.button1); this.panel1.Dock = DockStyle.Bottom; this.panel1.Location = new Point(0, 443); this.panel1.Name = "panel1"; this.panel1.Size = new Size(796, 33); this.panel1.TabIndex = 3; this.button3.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button3.FlatStyle = FlatStyle.Flat; this.button3.Location = new Point(709, 5); this.button3.Name = "button3"; this.button3.Size = new Size(75, 23); this.button3.TabIndex = 2; this.button3.Text = "Закрыть"; this.button3.Click += new EventHandler(this.button3_Click); this.button2.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button2.FlatStyle = FlatStyle.Flat; this.button2.Location = new Point(628, 5); this.button2.Name = "button2"; this.button2.Size = new Size(75, 23); this.button2.TabIndex = 1; this.button2.Text = "Отменить"; this.button2.Click += new EventHandler(this.button2_Click); this.button1.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.button1.FlatStyle = FlatStyle.Flat; this.button1.Location = new Point(547, 5); this.button1.Name = "button1"; this.button1.Size = new Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "Применить"; this.button1.Click += new EventHandler(this.button1_Click); this.gridControl6.ContextMenuStrip = this.contextMenuStrip1; this.gridControl6.DataMember = "color"; this.gridControl6.DataSource = (object)this.ds; this.gridControl6.Dock = DockStyle.Fill; this.gridControl6.EmbeddedNavigator.Name = ""; this.gridControl6.Location = new Point(306, 0); this.gridControl6.LookAndFeel.Style = LookAndFeelStyle.Flat; this.gridControl6.LookAndFeel.UseDefaultLookAndFeel = false; this.gridControl6.MainView = (BaseView)this.gridView6; this.gridControl6.Name = "gridControl6"; this.gridControl6.RepositoryItems.AddRange(new RepositoryItem[1] { (RepositoryItem)this.repositoryItemColorEdit1 }); this.gridControl6.Size = new Size(490, 443); this.gridControl6.TabIndex = 10; this.gridControl6.ViewCollection.AddRange(new BaseView[1] { (BaseView)this.gridView6 }); this.contextMenuStrip1.Items.AddRange(new ToolStripItem[4] { (ToolStripItem)this.toolStripMenuItem1, (ToolStripItem)this.toolStripMenuItem2, (ToolStripItem)this.toolStripSeparator2, (ToolStripItem)this.toolStripMenuItem7 }); this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Size = new Size(200, 76); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new Size(199, 22); this.toolStripMenuItem1.Text = "Добавить цвет"; this.toolStripMenuItem1.Click += new EventHandler(this.toolStripMenuItem1_Click); this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Size = new Size(199, 22); this.toolStripMenuItem2.Text = "Удалить цвет"; this.toolStripMenuItem2.Click += new EventHandler(this.toolStripMenuItem2_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new Size(196, 6); this.toolStripMenuItem7.Name = "toolStripMenuItem7"; this.toolStripMenuItem7.Size = new Size(199, 22); this.toolStripMenuItem7.Text = "Переместить в группу..."; this.toolStripMenuItem7.Click += new EventHandler(this.toolStripMenuItem7_Click); this.ds.DataSetName = "ds"; this.ds.EnforceConstraints = false; this.ds.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema; this.gridView6.Appearance.FocusedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.FocusedRow.BackColor2 = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.FocusedRow.BorderColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.FocusedRow.ForeColor = Color.Black; this.gridView6.Appearance.FocusedRow.Options.UseBackColor = true; this.gridView6.Appearance.FocusedRow.Options.UseBorderColor = true; this.gridView6.Appearance.FocusedRow.Options.UseForeColor = true; this.gridView6.Appearance.GroupPanel.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.GroupPanel.BackColor2 = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView6.Appearance.GroupPanel.Options.UseBackColor = true; this.gridView6.Appearance.HideSelectionRow.BackColor = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView6.Appearance.HideSelectionRow.BackColor2 = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView6.Appearance.HideSelectionRow.BorderColor = Color.FromArgb(192, 192, (int)byte.MaxValue); this.gridView6.Appearance.HideSelectionRow.ForeColor = Color.Black; this.gridView6.Appearance.HideSelectionRow.Options.UseBackColor = true; this.gridView6.Appearance.HideSelectionRow.Options.UseBorderColor = true; this.gridView6.Appearance.HideSelectionRow.Options.UseForeColor = true; this.gridView6.Appearance.SelectedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.SelectedRow.BackColor2 = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.SelectedRow.BorderColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.gridView6.Appearance.SelectedRow.ForeColor = Color.Black; this.gridView6.Appearance.SelectedRow.Options.UseBackColor = true; this.gridView6.Appearance.SelectedRow.Options.UseBorderColor = true; this.gridView6.Appearance.SelectedRow.Options.UseForeColor = true; this.gridView6.BorderStyle = BorderStyles.Simple; this.gridView6.Columns.AddRange(new GridColumn[8] { this.colname, this.colcomment, this.colcolor1, this.colcolorgroup, this.colwindraw, this.colshortname, this.colidcolorgroup, this.colnumpos }); this.gridView6.GridControl = this.gridControl6; this.gridView6.GroupPanelText = "Панель группировки"; this.gridView6.Name = "gridView6"; this.gridView6.OptionsCustomization.AllowFilter = false; this.gridView6.OptionsDetail.ShowDetailTabs = false; this.gridView6.OptionsSelection.MultiSelect = true; this.gridView6.OptionsView.ShowAutoFilterRow = true; this.gridView6.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never; this.gridView6.OptionsView.ShowIndicator = false; this.colname.Caption = "Наименование"; this.colname.FieldName = "name"; this.colname.Name = "colname"; this.colname.Visible = true; this.colname.VisibleIndex = 1; this.colname.Width = 90; this.colcomment.Caption = "Комментарий"; this.colcomment.FieldName = "comment"; this.colcomment.Name = "colcomment"; this.colcomment.Visible = true; this.colcomment.VisibleIndex = 3; this.colcomment.Width = 153; this.colcolor1.Caption = "Цвет"; this.colcolor1.ColumnEdit = (RepositoryItem)this.repositoryItemColorEdit1; this.colcolor1.FieldName = "color"; this.colcolor1.Name = "colcolor1"; this.colcolor1.Visible = true; this.colcolor1.VisibleIndex = 4; this.colcolor1.Width = 49; this.repositoryItemColorEdit1.AutoHeight = false; this.repositoryItemColorEdit1.Buttons.AddRange(new EditorButton[1] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemColorEdit1.Name = "repositoryItemColorEdit1"; this.repositoryItemColorEdit1.StoreColorAsInteger = true; this.colcolorgroup.Caption = "Группа"; this.colcolorgroup.FieldName = "colorgroup"; this.colcolorgroup.Name = "colcolorgroup"; this.colcolorgroup.Visible = true; this.colcolorgroup.VisibleIndex = 0; this.colcolorgroup.Width = 46; this.colwindraw.Caption = "Конструкции"; this.colwindraw.FieldName = "windraw"; this.colwindraw.Name = "colwindraw"; this.colwindraw.Visible = true; this.colwindraw.VisibleIndex = 5; this.colwindraw.Width = 49; this.colshortname.Caption = "Сокращенное наименование"; this.colshortname.FieldName = "shortname"; this.colshortname.Name = "colshortname"; this.colshortname.Visible = true; this.colshortname.VisibleIndex = 2; this.colshortname.Width = 103; this.colidcolorgroup.Caption = "idcolorgroup"; this.colidcolorgroup.FieldName = "idcolorgroup"; this.colidcolorgroup.Name = "colidcolorgroup"; this.colnumpos.Caption = "№пп"; this.colnumpos.FieldName = "numpos"; this.colnumpos.Name = "colnumpos"; this.colnumpos.Visible = true; this.colnumpos.VisibleIndex = 6; this.treeList1.Appearance.FocusedCell.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.treeList1.Appearance.FocusedCell.ForeColor = Color.Black; this.treeList1.Appearance.FocusedCell.Options.UseBackColor = true; this.treeList1.Appearance.FocusedCell.Options.UseForeColor = true; this.treeList1.Appearance.FocusedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.treeList1.Appearance.FocusedRow.ForeColor = Color.Black; this.treeList1.Appearance.FocusedRow.Options.UseBackColor = true; this.treeList1.Appearance.FocusedRow.Options.UseForeColor = true; this.treeList1.Appearance.HideSelectionRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.treeList1.Appearance.HideSelectionRow.BackColor2 = Color.FromArgb(128, 128, (int)byte.MaxValue); this.treeList1.Appearance.HideSelectionRow.ForeColor = Color.Black; this.treeList1.Appearance.HideSelectionRow.Options.UseBackColor = true; this.treeList1.Appearance.HideSelectionRow.Options.UseForeColor = true; this.treeList1.Appearance.SelectedRow.BackColor = Color.FromArgb(128, 128, (int)byte.MaxValue); this.treeList1.Appearance.SelectedRow.ForeColor = Color.Black; this.treeList1.Appearance.SelectedRow.Options.UseBackColor = true; this.treeList1.Appearance.SelectedRow.Options.UseForeColor = true; this.treeList1.BorderStyle = BorderStyles.Simple; this.treeList1.Columns.AddRange(new TreeListColumn[3] { this.treeListColumn1, this.treeListColumn2, this.treeListColumn3 }); this.treeList1.ContextMenuStrip = this.contextMenuStrip2; this.treeList1.DataMember = "colorgroup"; this.treeList1.DataSource = (object)this.ds; this.treeList1.Dock = DockStyle.Left; this.treeList1.HorzScrollVisibility = DevExpress.XtraTreeList.ScrollVisibility.Never; this.treeList1.ImageIndexFieldName = "_image"; this.treeList1.KeyFieldName = "idcolorgroup"; this.treeList1.Location = new Point(0, 0); this.treeList1.LookAndFeel.Style = LookAndFeelStyle.Flat; this.treeList1.LookAndFeel.UseDefaultLookAndFeel = false; this.treeList1.Name = "treeList1"; this.treeList1.OptionsView.ShowHorzLines = false; this.treeList1.OptionsView.ShowIndicator = false; this.treeList1.OptionsView.ShowVertLines = false; this.treeList1.ParentFieldName = "parentid"; this.treeList1.RepositoryItems.AddRange(new RepositoryItem[1] { (RepositoryItem)this.repositoryItemCheckEdit1 }); this.treeList1.SelectImageList = (object)this.imageList1; this.treeList1.Size = new Size(300, 443); this.treeList1.TabIndex = 11; this.treeListColumn1.Caption = "Группы цветов"; this.treeListColumn1.FieldName = "name"; this.treeListColumn1.MinWidth = 28; this.treeListColumn1.Name = "treeListColumn1"; this.treeListColumn1.OptionsColumn.AllowEdit = false; this.treeListColumn1.Visible = true; this.treeListColumn1.VisibleIndex = 0; this.treeListColumn1.Width = 196; this.treeListColumn2.Caption = "Активность"; this.treeListColumn2.ColumnEdit = (RepositoryItem)this.repositoryItemCheckEdit1; this.treeListColumn2.FieldName = "isactive"; this.treeListColumn2.Format.FormatType = FormatType.Numeric; this.treeListColumn2.Name = "treeListColumn2"; this.treeListColumn2.Visible = true; this.treeListColumn2.VisibleIndex = 1; this.repositoryItemCheckEdit1.AutoHeight = false; this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1"; this.treeListColumn3.Caption = "№пп"; this.treeListColumn3.FieldName = "numpos"; this.treeListColumn3.Name = "treeListColumn3"; this.treeListColumn3.Visible = true; this.treeListColumn3.VisibleIndex = 2; this.contextMenuStrip2.Items.AddRange(new ToolStripItem[5] { (ToolStripItem)this.toolStripMenuItem3, (ToolStripItem)this.toolStripMenuItem4, (ToolStripItem)this.toolStripMenuItem5, (ToolStripItem)this.toolStripSeparator1, (ToolStripItem)this.toolStripMenuItem6 }); this.contextMenuStrip2.Name = "contextMenuStrip2"; this.contextMenuStrip2.Size = new Size(221, 98); this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Size = new Size(220, 22); this.toolStripMenuItem3.Text = "Добавить основную группу"; this.toolStripMenuItem3.Click += new EventHandler(this.toolStripMenuItem3_Click); this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Size = new Size(220, 22); this.toolStripMenuItem4.Text = "Добавить дочернюю группу"; this.toolStripMenuItem4.Click += new EventHandler(this.toolStripMenuItem4_Click); this.toolStripMenuItem5.Name = "toolStripMenuItem5"; this.toolStripMenuItem5.Size = new Size(220, 22); this.toolStripMenuItem5.Text = "Переименовать"; this.toolStripMenuItem5.Click += new EventHandler(this.toolStripMenuItem5_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new Size(217, 6); this.toolStripMenuItem6.Name = "toolStripMenuItem6"; this.toolStripMenuItem6.Size = new Size(220, 22); this.toolStripMenuItem6.Text = "Удалить"; this.toolStripMenuItem6.Click += new EventHandler(this.toolStripMenuItem6_Click); this.imageList1.ImageStream = (ImageListStreamer)componentResourceManager.GetObject("imageList1.ImageStream"); this.imageList1.TransparentColor = Color.Magenta; this.imageList1.Images.SetKeyName(0, "Folder.ico"); this.splitterControl1.Location = new Point(300, 0); this.splitterControl1.Name = "splitterControl1"; this.splitterControl1.Size = new Size(6, 443); this.splitterControl1.TabIndex = 12; this.splitterControl1.TabStop = false; this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.Controls.Add((Control)this.gridControl6); this.Controls.Add((Control)this.splitterControl1); this.Controls.Add((Control)this.treeList1); this.Controls.Add((Control)this.panel1); this.Name = "ColorForm"; this.Size = new Size(796, 476); this.Text = "Цвета"; this.Load += new EventHandler(this.ColorForm_Load); this.panel1.ResumeLayout(false); this.gridControl6.EndInit(); this.contextMenuStrip1.ResumeLayout(false); this.ds.EndInit(); this.gridView6.EndInit(); this.repositoryItemColorEdit1.EndInit(); this.treeList1.EndInit(); this.repositoryItemCheckEdit1.EndInit(); this.contextMenuStrip2.ResumeLayout(false); this.ResumeLayout(false); }
internal static void SaveTopic(ds.FeedRow feed, ds.TopicRow row) { try { using (dsTableAdapters.TopicTableAdapter ta = new dsTableAdapters.TopicTableAdapter()) { if (row.Id <= 0) { topics.AddTopicRow(row); } ta.Update(row); ta.Update(topics); if (feed.ShowRead) ta.FillBy(topics, feed.Id); else ta.FillUnread(topics, feed.Id); } } catch { var dr = feeds.GetErrors(); if (dr.Length > 0) { Notificator.NotifyMessage(dr[0].RowError); } throw; } }
public static void Parse(ds.FeedRow feed) { Regex r1 = new Regex(regex1, RegexOptions.IgnoreCase); Regex r2 = new Regex(regex2, RegexOptions.IgnoreCase); var reader = XmlReader.Create(Get(feed.Link)); XDocument doc = XDocument.Load(reader); if (doc.Root.Name.LocalName == "rss") { if (String.IsNullOrEmpty(feed.Title)) { var str = doc.Root.Descendants().First(i => i.Name.LocalName == "channel").Elements().First(i => i.Name.LocalName == "title").Value; feed.Title = (string)str; return; } foreach (XElement item in doc.Root.Descendants().First(i => i.Name.LocalName == "channel").Elements().Where(i => i.Name.LocalName == "item")) { string guid = item.Elements().First(i => i.Name.LocalName == "guid").Value; if (Db.FindTopic(guid) != null) continue; DateTime published = ParseDate(item.Elements().First(i => i.Name.LocalName == "pubDate").Value); ds.TopicRow row = Db.NewTopic(feed); row.Guid = guid; row.FeedId = feed.Id; row.PubDate = published; row.Content = ( item.Elements().FirstOrDefault(i => i.Name.LocalName == "encoded") != null ? item.Elements().FirstOrDefault(i => i.Name.LocalName == "encoded").Value : (item.Elements().FirstOrDefault(i => i.Name.LocalName == "content") != null ? item.Elements().FirstOrDefault(i => i.Name.LocalName == "content").Value : item.Elements().FirstOrDefault(i => i.Name.LocalName == "description").Value ) ); row.Link = item.Elements().First(i => i.Name.LocalName == "link").Value; row.Title = item.Elements().First(i => i.Name.LocalName == "title").Value; row.Author = item.Elements().FirstOrDefault(i => i.Name.LocalName == "author") == null ? "" : item.Elements().First(i => i.Name.LocalName == "author").Value; if (feed.Type == 0) { row.Author = row.Content.Substring(0, row.Content.IndexOf(" про")); row.Content = row.Content.Replace("\n", "<br />"); row.Content = r1.Replace(row.Content, @"<a href=""javascript:window.external.Open('$1');"">$1</a>").Replace("href=\"www", "href=\"http://www"); } row.Content = r2.Replace(row.Content, @"<a href=""javascript:window.external.Open('$2');"" $3>").Replace("href=\"www", "href=\"http://www"); Db.SaveTopic(feed, row); if (published != null && feed.LastUpdated < published) feed.LastUpdated = published; }; } else if (doc.Root.Name.LocalName == "feed") { /* var entries = from item in doc.Root.Elements().Where(i => i.Name.LocalName == "entry") select new RssItem { FeedId = feed.Id, Id = item.Elements().First(i => i.Name.LocalName == "id").Value, Content = (item.Elements().FirstOrDefault(i => i.Name.LocalName == "content") != null ? item.Elements().FirstOrDefault(i => i.Name.LocalName == "content").Value : ""), Link = (item.Elements().FirstOrDefault(i => i.Name.LocalName == "link") != null ? item.Elements().FirstOrDefault(i => i.Name.LocalName == "link").Attribute("href").Value : ""), Created = ParseDate( item.Elements().FirstOrDefault(i => i.Name.LocalName == "published") != null ? item.Elements().First(i => i.Name.LocalName == "published").Value :(item.Elements().FirstOrDefault(i => i.Name.LocalName == "updated") != null ? item.Elements().First(i => i.Name.LocalName == "updated").Value : "" ) ), Subject = item.Elements().First(i => i.Name.LocalName == "title").Value }; return entries.ToList(); */ } reader.Close(); }