Click here to Skip to main content
15,893,790 members
Articles / Programming Languages / C#

.NET like Access(V1)

Rate me:
Please Sign up or sign in to vote.
3.20/5 (10 votes)
28 Feb 20067 min read 57.7K   542   40  
Database library for rapid development.
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace DBProject
{
	public class UC_Title : DNetLibrary.UC_DataWindow
	{
		private System.Windows.Forms.Label lbltitle_id;
		private System.Windows.Forms.Label lbltitle;
		private System.Windows.Forms.Label lbltype;
		private System.Windows.Forms.Label lblpub_id;
		private System.Windows.Forms.Label lblprice;
		private System.Windows.Forms.Label lbladvance;
		private System.Windows.Forms.Label lblroyalty;
		private System.Windows.Forms.Label lblytd_sales;
		private System.Windows.Forms.Label lblnotes;
		private System.Windows.Forms.Label lblpubdate;
		private DS_PUBS ds_PUBS;
		private System.Windows.Forms.TextBox edittitle_id;
		private System.Windows.Forms.TextBox edittitle;
		private System.Windows.Forms.TextBox edittype;
		private System.Windows.Forms.TextBox editpub_id;
		private System.Windows.Forms.TextBox editprice;
		private System.Windows.Forms.TextBox editadvance;
		private System.Windows.Forms.TextBox editroyalty;
		private System.Windows.Forms.TextBox editytd_sales;
		private System.Windows.Forms.TextBox editnotes;
		private System.Windows.Forms.TextBox editpubdate;
		private System.ComponentModel.IContainer components = null;

		public UC_Title()
		{
			InitializeComponent();						
			base.InitData();
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.lbltitle_id = new System.Windows.Forms.Label();
			this.lbltitle = new System.Windows.Forms.Label();
			this.lbltype = new System.Windows.Forms.Label();
			this.lblpub_id = new System.Windows.Forms.Label();
			this.lblprice = new System.Windows.Forms.Label();
			this.lbladvance = new System.Windows.Forms.Label();
			this.lblroyalty = new System.Windows.Forms.Label();
			this.lblytd_sales = new System.Windows.Forms.Label();
			this.lblnotes = new System.Windows.Forms.Label();
			this.lblpubdate = new System.Windows.Forms.Label();
			this.ds_PUBS = new DS_PUBS();
			this.edittitle_id = new System.Windows.Forms.TextBox();
			this.edittitle = new System.Windows.Forms.TextBox();
			this.edittype = new System.Windows.Forms.TextBox();
			this.editpub_id = new System.Windows.Forms.TextBox();
			this.editprice = new System.Windows.Forms.TextBox();
			this.editadvance = new System.Windows.Forms.TextBox();
			this.editroyalty = new System.Windows.Forms.TextBox();
			this.editytd_sales = new System.Windows.Forms.TextBox();
			this.editnotes = new System.Windows.Forms.TextBox();
			this.editpubdate = new System.Windows.Forms.TextBox();
			((System.ComponentModel.ISupportInitialize)(this.ds_PUBS)).BeginInit();
			this.SuspendLayout();
			// 
			// lbltitle_id
			// 
			this.lbltitle_id.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lbltitle_id.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lbltitle_id.ForeColor = System.Drawing.Color.White;
			this.lbltitle_id.Location = new System.Drawing.Point(8, 16);
			this.lbltitle_id.Name = "lbltitle_id";
			this.lbltitle_id.TabIndex = 23;
			this.lbltitle_id.Text = "ID:";
			this.lbltitle_id.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lbltitle
			// 
			this.lbltitle.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lbltitle.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lbltitle.ForeColor = System.Drawing.Color.White;
			this.lbltitle.Location = new System.Drawing.Point(8, 48);
			this.lbltitle.Name = "lbltitle";
			this.lbltitle.TabIndex = 24;
			this.lbltitle.Text = "Title:";
			this.lbltitle.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lbltype
			// 
			this.lbltype.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lbltype.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lbltype.ForeColor = System.Drawing.Color.White;
			this.lbltype.Location = new System.Drawing.Point(8, 80);
			this.lbltype.Name = "lbltype";
			this.lbltype.TabIndex = 25;
			this.lbltype.Text = "Type:";
			this.lbltype.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblpub_id
			// 
			this.lblpub_id.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblpub_id.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblpub_id.ForeColor = System.Drawing.Color.White;
			this.lblpub_id.Location = new System.Drawing.Point(8, 112);
			this.lblpub_id.Name = "lblpub_id";
			this.lblpub_id.TabIndex = 26;
			this.lblpub_id.Text = "Publisher:";
			this.lblpub_id.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblprice
			// 
			this.lblprice.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblprice.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblprice.ForeColor = System.Drawing.Color.White;
			this.lblprice.Location = new System.Drawing.Point(8, 144);
			this.lblprice.Name = "lblprice";
			this.lblprice.TabIndex = 27;
			this.lblprice.Text = "Price:";
			this.lblprice.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lbladvance
			// 
			this.lbladvance.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lbladvance.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lbladvance.ForeColor = System.Drawing.Color.White;
			this.lbladvance.Location = new System.Drawing.Point(232, 16);
			this.lbladvance.Name = "lbladvance";
			this.lbladvance.TabIndex = 33;
			this.lbladvance.Text = "Advance:";
			this.lbladvance.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblroyalty
			// 
			this.lblroyalty.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblroyalty.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblroyalty.ForeColor = System.Drawing.Color.White;
			this.lblroyalty.Location = new System.Drawing.Point(232, 48);
			this.lblroyalty.Name = "lblroyalty";
			this.lblroyalty.TabIndex = 34;
			this.lblroyalty.Text = "Royalty:";
			this.lblroyalty.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblytd_sales
			// 
			this.lblytd_sales.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblytd_sales.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblytd_sales.ForeColor = System.Drawing.Color.White;
			this.lblytd_sales.Location = new System.Drawing.Point(232, 80);
			this.lblytd_sales.Name = "lblytd_sales";
			this.lblytd_sales.TabIndex = 35;
			this.lblytd_sales.Text = "Sales:";
			this.lblytd_sales.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblnotes
			// 
			this.lblnotes.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblnotes.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblnotes.ForeColor = System.Drawing.Color.White;
			this.lblnotes.Location = new System.Drawing.Point(232, 112);
			this.lblnotes.Name = "lblnotes";
			this.lblnotes.TabIndex = 36;
			this.lblnotes.Text = "Notes:";
			this.lblnotes.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// lblpubdate
			// 
			this.lblpubdate.BackColor = System.Drawing.Color.DarkOliveGreen;
			this.lblpubdate.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.lblpubdate.ForeColor = System.Drawing.Color.White;
			this.lblpubdate.Location = new System.Drawing.Point(8, 176);
			this.lblpubdate.Name = "lblpubdate";
			this.lblpubdate.TabIndex = 37;
			this.lblpubdate.Text = "Pub. date:";
			this.lblpubdate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// ds_PUBS
			// 
			this.ds_PUBS.DataSetName = "DS_PUBS";
			this.ds_PUBS.Locale = new System.Globalization.CultureInfo("en-US");
			// 
			// edittitle_id
			// 
			this.edittitle_id.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.title_id"));
			this.edittitle_id.Location = new System.Drawing.Point(112, 16);
			this.edittitle_id.Name = "edittitle_id";
			this.edittitle_id.TabIndex = 43;
			this.edittitle_id.Text = "";
			// 
			// edittitle
			// 
			this.edittitle.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.title"));
			this.edittitle.Location = new System.Drawing.Point(112, 48);
			this.edittitle.Name = "edittitle";
			this.edittitle.TabIndex = 44;
			this.edittitle.Text = "";
			// 
			// edittype
			// 
			this.edittype.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.type"));
			this.edittype.Location = new System.Drawing.Point(112, 80);
			this.edittype.Name = "edittype";
			this.edittype.TabIndex = 45;
			this.edittype.Text = "";
			// 
			// editpub_id
			// 
			this.editpub_id.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.pub_id"));
			this.editpub_id.Location = new System.Drawing.Point(112, 112);
			this.editpub_id.Name = "editpub_id";
			this.editpub_id.TabIndex = 46;
			this.editpub_id.Text = "";
			// 
			// editprice
			// 
			this.editprice.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.price"));
			this.editprice.Location = new System.Drawing.Point(112, 144);
			this.editprice.Name = "editprice";
			this.editprice.TabIndex = 47;
			this.editprice.Text = "";
			// 
			// editadvance
			// 
			this.editadvance.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.advance"));
			this.editadvance.Location = new System.Drawing.Point(336, 16);
			this.editadvance.Name = "editadvance";
			this.editadvance.TabIndex = 48;
			this.editadvance.Text = "";
			// 
			// editroyalty
			// 
			this.editroyalty.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.royalty"));
			this.editroyalty.Location = new System.Drawing.Point(336, 48);
			this.editroyalty.Name = "editroyalty";
			this.editroyalty.TabIndex = 49;
			this.editroyalty.Text = "";
			// 
			// editytd_sales
			// 
			this.editytd_sales.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.ytd_sales"));
			this.editytd_sales.Location = new System.Drawing.Point(336, 80);
			this.editytd_sales.Name = "editytd_sales";
			this.editytd_sales.TabIndex = 50;
			this.editytd_sales.Text = "";
			// 
			// editnotes
			// 
			this.editnotes.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.notes"));
			this.editnotes.Location = new System.Drawing.Point(336, 112);
			this.editnotes.Multiline = true;
			this.editnotes.Name = "editnotes";
			this.editnotes.Size = new System.Drawing.Size(176, 96);
			this.editnotes.TabIndex = 51;
			this.editnotes.Text = "";
			// 
			// editpubdate
			// 
			this.editpubdate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.ds_PUBS, "titles.pubdate"));
			this.editpubdate.Location = new System.Drawing.Point(112, 176);
			this.editpubdate.Name = "editpubdate";
			this.editpubdate.TabIndex = 52;
			this.editpubdate.Text = "";
			// 
			// UC_Title
			// 
			this.BackColor = System.Drawing.Color.DarkGoldenrod;
			this.Controls.Add(this.editadvance);
			this.Controls.Add(this.editroyalty);
			this.Controls.Add(this.editytd_sales);
			this.Controls.Add(this.editnotes);
			this.Controls.Add(this.editpubdate);
			this.Controls.Add(this.edittitle_id);
			this.Controls.Add(this.edittitle);
			this.Controls.Add(this.edittype);
			this.Controls.Add(this.editpub_id);
			this.Controls.Add(this.editprice);
			this.Controls.Add(this.lbltitle_id);
			this.Controls.Add(this.lbltitle);
			this.Controls.Add(this.lbltype);
			this.Controls.Add(this.lblpub_id);
			this.Controls.Add(this.lblprice);
			this.Controls.Add(this.lbladvance);
			this.Controls.Add(this.lblroyalty);
			this.Controls.Add(this.lblytd_sales);
			this.Controls.Add(this.lblnotes);
			this.Controls.Add(this.lblpubdate);
			this.DS_Data = this.ds_PUBS;
			this.Name = "UC_Title";
			this.RetrieveAtOpening = true;
			this.Size = new System.Drawing.Size(528, 224);
			this.Table = this.ds_PUBS.titles;
			this.Load += new System.EventHandler(this.UC_Title_Load);
			((System.ComponentModel.ISupportInitialize)(this.ds_PUBS)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
		private void UC_Title_Load(object sender, System.EventArgs e)
		{			
		}
		/*class*/}
	/*name space*/}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) NSW Curriculum & Learning Innovation Centre
Australia Australia
I am a senior developer self taught,
the main study is electronics and communication engineering

I am working as senior programmer in center for learning and innovation
www.cli.nsw.edu.au

I develop Software since 1995 using Delphi with Microsoft SQL Server

before 2000, I didn’t like Microsoft tools and did many projects using all database tools and other programming tools specially Borland C++ Builder, Delphi, Power Builder
And I loved Oracle database for its stability until I was certified as Master in Database Administration from Oracle University.

I tried to work in web programming but I felt that Java is hard and slow in programming, specially I love productivity.

I began worked with .Net since 2001 , and at the same time Microsoft SQL Server 7 was very stable so I switched all my way to Microsoft Tech.
I really respect .Net Platform especially in web applications

I love database Applications too much
And built library with PowerBuilder it was very useful for me and other developers

I have a wide experience due to my work in different companies
But the best experience I like in wireless applications, and web applications.
The best Application I did in my life is Novartis Marketing System 1999 it takes 8 months developing with PowerBuilder and Borland C++, SQL Server
Performance was the key challenge in this Application.
The other 2 applications that I loved Multilingual Project in Scada company in Italy 2000 and SDP Mobile media content platform server for ChinaUnicom 2004
I hope that you enjoy any Article I post.
God bless you.

Comments and Discussions