Professional Documents
Culture Documents
Using System
Using System
cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RemoteNetworkSystem
{
public partial class Login : Form
{
SqlConnection con = new SqlConnection("Data Source=.;Initial
Catalog=RemoteNetwork;Integrated Security=True");
public Login()
{
InitializeComponent();
}
con.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}
}
else
{
MessageBox.Show("Please provide
UserID/Password.",Application.CompanyName);
}
}
try
{
string qry = "select count(*) from users where userid='" +
uidTextBox.Text + "' and password='" + pwdTextBox.Text + "'";
SqlCommand cmd = new SqlCommand(qry, con);
con.Open();
int temp = Convert.ToInt32(cmd.ExecuteScalar());
if (temp > 0)
{
this.Hide();
userDashboard db = new userDashboard();
db.Show();
}
else
{
MessageBox.Show("Invalid Username/Password.");
}
con.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}
}
else
{
MessageBox.Show("Please provide UserID/Password.",
Application.CompanyName);
}
}
}
private void Login_Load(object sender, EventArgs e)
{
}
}
}
user register UC
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace RemoteNetworkSystem
{
public partial class userRegUC : UserControl
{
SqlConnection con = new SqlConnection("Data Source=.;Initial
Catalog=RemoteNetwork;Integrated Security=True");
public userRegUC()
{
InitializeComponent();
}
monitorusersessionUC
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace RemoteNetworkSystem
{
public partial class monitorUserSession : UserControl
{
SqlConnection con = new SqlConnection("Data Source=.;Initial
Catalog=RemoteNetwork;Integrated Security=True");
string currentdate = System.DateTime.Now.ToShortDateString();
public monitorUserSession()
{
InitializeComponent();
}
string qry = "select * from userlogin where date ='" + currentdate + "'";
}
}
}
if (e.Value != null)
{
if (e.Value.ToString() == "1")
{
e.Value = "User has attempted proxy site, 1st time.";
}
if (this.dataGridView1.Columns[e.ColumnIndex].Name == "remainingtime")
{
if (e.Value != null)
{
if (e.Value.ToString() == "10")
{
e.Value = "10 minutes left for this user's session.";
e.FormattingApplied = true;
}
}
}
}
}
Partial Classes in C# A partial class is a special feature of C#. It provides a special ability to implement
the functionality of a single class into multiple files and all these files are combined into a single class file
when the application is compiled. A partial class is created by using a partial keyword.
Generics Overview
using System
The first, using System, is the same using directive you have seen in every program in this tutorial. It
allows you to type the method names of members of the Systemnamespace without typing the
word System every time. In myPrint(), Console is a class member of the System namespace with the
method WriteLine().
The System.ComponentModel namespace provides classes that are used to implement the run-time and
design-time behavior of components and controls.
The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.
Classes
Remarks. The Graphics class provides methods for drawing to the display device. Classes such as
Rectangle and Point encapsulate GDI+ primitives. ... Classes within the System.Drawing namespace are
not supported for use within a Windows or ASP.NET service.
The namespace provides classes and interfaces that support queries that use Language-Integrated
Query (LINQ).
The System.Text namespace contains classes that represent ASCII and Unicode character encodings;
abstract base classes for converting blocks of characters to and from blocks of bytes; and a helper class that
manipulates and formats String objects without creating intermediate instances of String.
Classes
The System.Threading.Tasks namespace provides types that simplify the work of writing concurrent and
asynchronous code. The main types are Task which represents an asynchronous operation that can be
waited on and cancelled, and Task<TResult>, which is a task that can return a value. The TaskFactory class
provides static methods for creating and starting tasks, and the TaskSchedulerclass provides the default
thread scheduling infrastructure.
Classes
To create a new table within a database, you use theMySQL CREATE TABLE statement. The CREATE
TABLEstatement is one of the most complex statements inMySQL. First, you specify the name of
the table that you want to create after the CREATE TABLE clause.
A foreign key is a set of one or more columns in a table that refers to the primary key in another table.
There isn't any special code, configurations, or table definitions you need to place to officially “designate”
a foreign key
➢ How to show or represent record in table
Tables are also called datasheets. Each table in a database holds data about a different, but related,
subject. Data is stored in records. A record is composed offields and contains all the data about one
particular person, company, or item in a database.
A table is an entity containing records. A Record is a collection of fields holding data about one item in
an entity. An example might be an order from a store. There is atable of orders. Each individual order is
a record containing fields for the Order #, customer, date etc.
Data modification language statements (DML) INSERT, UPDATE, and DELETE. Use
the INSERT command to enter data into a table. You may insert one row at a time, or select several
rows from an existing table and insert them all at once.
Project work is a series of activities that allows the students to study,do research and act by themselves
using their abilities, interests, personal experience and aptitiudes. The Project Work Progresses under
the guidance and monitoring of a Teacher or other Adviser.
Dividing your project management efforts into these five phases can help give your efforts structure and
simplify them into a series of logical and manageable steps.
Project Initiation. ...
Project Planning. ...
Project Execution. ...
Project Monitoring and Control. ...
Project Closure.
A project plan can be considered to have five key characteristics that have to be managed:
Definition of Project Success. ... Project management success is defined by the level of efficiency
the project achieved to reach the project objectives. Efficiency is related to how the project manages its
limited resources to meet the goals while building good relationships with internal and external
stakeholders.
The project success criteria refer to measurable terms of what should be the outcome of the project that
is acceptable to the end user, customer, and the stakeholders. In other words, the project
success factors consist of activities or elements that are required to ensure successful completion of
the project.
➢ Back-end of all web pages
➢ How to change restrictions (if any)
Allow changes to other settings and features
In Java, you can create combo boxes. A combo boxis a combination of a text field and a drop-down list
from which the user can choose a value. If the text-field portion of the control is editable, the user can
enter a value in the field or edit a value retrieved from the drop-down list.
MAC address
A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the
physical network segment.MAC addresses are used as a network address for most IEEE 802 network technologies, including
Ethernet and WiFi. Facebook page : https://www.facebook.com/networkkingss.
The purpose of MAC addresses is to provide a unique hardware address or physical address for every node on a local area
network (LAN) or other network. A node is a point at which a computer or other device (e.g., a printer or router) is connected to the
network.
IP address is a number assigned to the connection in a network. The basicdifference between MAC address and IP address is
that a MAC address uniquely identifies a device that wants to take part in a network. On the other hand, an IP address uniquely
defines a connection of a network with an interface of a device.
A Mac Address is the physical or virtual address of your NIC card or network interface. From a computer on a network's standpoint,
it is the physical address of that computer's NIC card. It is used to bring information to that computer on Layer 2 of the OSI model.
The IP address is required on layer 3.
Stands for "Media Access Control Address," and no, it is not related Apple Macintosh computers. A MAC address is a hardware
identification number that uniquely identifies each device on a network.
The MAC address is a unique value associated with a network adapter. MAC addresses are also known
as hardware addresses or physical addresses. They uniquely identify an adapter on a LAN.
MAC addresses are 12-digit hexadecimal numbers (48 bits in length). By convention, MAC addresses are usually
written in one of the following formats:
MM:MM:MM:SS:SS:SS
MMMM-MMSS-SSSS
The first half (24 BITS) of a MAC address contains the ID number of the adapter manufacturer. These IDs are
regulated by an Internet standards body (see sidebar). The second half (24 MORE BITS) of a MAC address
represents the serial number assigned to the adapter by the manufacturer. In the example,
00:A0:C9:14:C8:29
The prefix
00A0C9
indicates the manufacturer is Intel Corporation