| @@ -0,0 +1,62 @@ | ||
| using Acme_Project.Business_Logic_Layer; | ||
| using Acme_Project.Data_Access_Layer; | ||
| 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 Acme_Project.Categories | ||
| { | ||
| public partial class frmUpdateCategory : Form | ||
| { | ||
| public frmUpdateCategory(_Category updateCategory) | ||
| { | ||
| InitializeComponent(); | ||
| //Fill in the form | ||
| txtCategoryID.Text = updateCategory.CategoryID.ToString(); | ||
| txtCategory.Text = updateCategory.Category; | ||
| } | ||
|
|
||
| private void btnUpdateCategories_Click(object sender, EventArgs e) | ||
| { | ||
| if (validateInput()) | ||
| { | ||
| //Create an object of the Category class. | ||
| var updateExistingCategory = new _Category(int.Parse(txtCategoryID.Text), | ||
| txtCategory.Text); | ||
|
|
||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| { | ||
| //Specify the Stored Procedure | ||
| using (var cmd = new SqlCommand("sp_Categories_UpdateCategory", conn)) | ||
| { | ||
| cmd.CommandType = CommandType.StoredProcedure; | ||
| cmd.Parameters.AddWithValue("CategoryID", updateExistingCategory.CategoryID); | ||
| cmd.Parameters.AddWithValue("Category", updateExistingCategory.Category); | ||
|
|
||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
| } | ||
| } | ||
| this.Close(); | ||
| } | ||
| } | ||
|
|
||
| private bool validateInput() | ||
| { | ||
| if (String.IsNullOrEmpty(txtCategory.Text)) | ||
| { | ||
| MessageBox.Show("Please enter the Category Name."); | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| } | ||
| } |
| @@ -196,10 +196,7 @@ private void btnDeleteCustomers_Click(object sender, EventArgs e) | ||
|
|
||
| DisplayCustomers(); //Refresh the table | ||
| } | ||
| } | ||
| } | ||
| else | ||
| { | ||
| @@ -0,0 +1,66 @@ | ||
| using Acme_Project.Business_Logic_Layer; | ||
| using Acme_Project.Data_Access_Layer; | ||
| 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 Acme_Project.Presentation_Layer.ProductTypes | ||
| { | ||
| public partial class frmAddProductTypes : Form | ||
| { | ||
| public frmAddProductTypes() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| private bool validateInput() | ||
| { | ||
| if (String.IsNullOrEmpty(txtProductType.Text)) | ||
| { | ||
| MessageBox.Show("Please enter the Product Type."); | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| private void btnAddProductTypes_Click(object sender, EventArgs e) | ||
| { | ||
| if (validateInput()) | ||
| { | ||
| //Create the sale object using the Sale Class constructor | ||
| var productType = new _ProductType(); | ||
|
|
||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| using (var cmd = new SqlCommand("sp_ProductTypes_CreateProductType", conn)) | ||
| { | ||
| cmd.CommandType = CommandType.StoredProcedure; | ||
|
|
||
| SqlParameter nptid = cmd.Parameters.Add("NewProductTypeID", SqlDbType.Int); nptid.Direction = ParameterDirection.Output; | ||
| cmd.Parameters.AddWithValue("ProductType", txtProductType.Text); | ||
|
|
||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
|
|
||
| } | ||
| if (MessageBox.Show("Would you like to add another Product Type into the database", "Add another?", | ||
| MessageBoxButtons.YesNo) == DialogResult.Yes) | ||
| { | ||
| txtProductType.Clear(); | ||
| txtProductTypeID.Clear(); | ||
| } | ||
| else | ||
| { | ||
| this.Close(); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,186 @@ | ||
| using Acme_Project.Business_Logic_Layer; | ||
| using Acme_Project.Data_Access_Layer; | ||
| 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 Acme_Project.Presentation_Layer.ProductTypes | ||
| { | ||
| public partial class frmMainProductTypes : Form | ||
| { | ||
| public frmMainProductTypes() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| private void DisplayProductTypes() | ||
| { | ||
| string selectQuery; | ||
| selectQuery = "SELECT * FROM ProductTypes"; | ||
| List<_ProductType> ptList = new List<_ProductType>(); | ||
| try | ||
| { | ||
| // Automatically open and close the connection | ||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| using (var cmd = new SqlCommand(selectQuery, conn)) | ||
| using (var rdr = cmd.ExecuteReader()) | ||
| { | ||
| while (rdr.Read()) | ||
| { | ||
| //Define the list items | ||
| var productType = new _ProductType( | ||
| int.Parse(rdr["ProductTypeID"].ToString()), | ||
| rdr["ProductType"].ToString()); | ||
|
|
||
| ptList.Add(productType); | ||
| } | ||
| dgvProductType.DataSource = ptList; | ||
| } | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
| MessageBox.Show("Unsuccessful" + ex); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| private void btnAddProductType_Click(object sender, EventArgs e) | ||
| { | ||
| frmAddProductTypes addProductTypes = new frmAddProductTypes(); | ||
| addProductTypes.ShowDialog(); | ||
| DisplayProductTypes(); | ||
| } | ||
|
|
||
| private void btnUpdateProductType_Click(object sender, EventArgs e) | ||
| { | ||
| if (dgvProductType.SelectedRows.Count > 0) | ||
| { | ||
| DataGridViewRow selectedRow = dgvProductType.SelectedRows[0]; //Selecting the row | ||
| var productType = (_ProductType)selectedRow.DataBoundItem; //setting Product Type to an instance of the Product Type Class of the selected row. | ||
|
|
||
| frmUpdateProductTypes productTypeUpdate = new frmUpdateProductTypes(productType); | ||
| productTypeUpdate.ShowDialog(); | ||
| DisplayProductTypes(); | ||
| } | ||
| } | ||
|
|
||
| private void btnSearchProductType_Click(object sender, EventArgs e) | ||
| { | ||
| List<_ProductType> ptList = new List<_ProductType>(); | ||
| try | ||
| { | ||
| // Automatically open and close the connection | ||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| { | ||
| using (var cmd = conn.CreateCommand()) | ||
| { | ||
| if (rbShowAll.Checked) | ||
| { | ||
| cmd.CommandText = "SELECT * FROM ProductTypes"; | ||
| } | ||
| if (rbSearchProductTypeID.Checked) | ||
| { | ||
| cmd.CommandText = "SELECT * FROM ProductTypes WHERE ProductTypeID = @producttypeid"; | ||
| } | ||
| if (rbSearchProductType.Checked) | ||
| { | ||
| cmd.CommandText = "SELECT * FROM ProductTypes WHERE ProductType = @producttype"; | ||
| } | ||
|
|
||
| cmd.Parameters.AddWithValue("producttypeid", txtSearchProductTypeID.Text); | ||
| cmd.Parameters.AddWithValue("producttype", txtSearchProductType.Text); | ||
|
|
||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
| using (var rdr = cmd.ExecuteReader()) | ||
| { | ||
| while (rdr.Read()) | ||
| { | ||
| //Define the list items | ||
| var producttype = new _ProductType( | ||
| int.Parse(rdr["ProductTypeID"].ToString()), | ||
| rdr["ProductType"].ToString()); | ||
|
|
||
| ptList.Add(producttype); | ||
| } | ||
| dgvProductType.DataSource = ptList; | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
| catch (Exception ex) | ||
| { | ||
| MessageBox.Show("Unsuccessful" + ex); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| private void frmMainProductTypes_Load(object sender, EventArgs e) | ||
| { | ||
| DisplayProductTypes(); | ||
| } | ||
|
|
||
| private void btnDeleteProductType_Click(object sender, EventArgs e) | ||
| { | ||
| if (dgvProductType.SelectedRows.Count > 0) | ||
| { | ||
| DialogResult dialogResult = MessageBox.Show("Are you sure you wish to delete this Product Type?", "Product Type Delete", MessageBoxButtons.YesNo); | ||
| if (dialogResult == DialogResult.No) | ||
| { | ||
| return; | ||
| } | ||
| DataGridViewRow selectedRow = dgvProductType.SelectedRows[0]; //Selecting the row | ||
| var deleteProductType = (_ProductType)selectedRow.DataBoundItem; //setting deleteProductType to an instance of the Product Type Class of the selected row. | ||
|
|
||
| //Test to see if the Product Type can be deleted | ||
|
|
||
|
|
||
| //Code to check if the Product Type can be deleted using the stored procedure given | ||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| { | ||
| using (var cmd = new SqlCommand("sp_ProductTypes_AllowDeleteProductType", conn)) | ||
| { | ||
| cmd.CommandType = CommandType.StoredProcedure; | ||
| cmd.Parameters.AddWithValue("ProductTypeID", deleteProductType.ProductTypeID); | ||
| cmd.Parameters.Add("RecordCount", SqlDbType.Int).Direction = ParameterDirection.Output; | ||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
| int validDelete = Convert.ToInt32(cmd.Parameters["RecordCount"].Value); | ||
| if (validDelete == 1) | ||
| { | ||
| MessageBox.Show("Product Type can not be deleted.", "Error"); | ||
| return; | ||
| } | ||
| } | ||
| //Code to delete the Product Type | ||
| using (var cmd = new SqlCommand("sp_ProductTypes_DeleteProductType", conn)) | ||
| { | ||
| cmd.CommandType = CommandType.StoredProcedure; | ||
| cmd.Parameters.AddWithValue("ProductTypeID", deleteProductType.ProductTypeID); | ||
|
|
||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
|
|
||
| DisplayProductTypes(); //Refresh the table | ||
| } | ||
| } | ||
| } | ||
| else | ||
| { | ||
| MessageBox.Show("Please select a Product Type to delete from the table.", "Error"); | ||
| } | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,132 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <root> | ||
| <!-- | ||
| Microsoft ResX Schema | ||
| Version 2.0 | ||
| The primary goals of this format is to allow a simple XML format | ||
| that is mostly human readable. The generation and parsing of the | ||
| various data types are done through the TypeConverter classes | ||
| associated with the data types. | ||
| Example: | ||
| ... ado.net/XML headers & schema ... | ||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| <resheader name="version">2.0</resheader> | ||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| </data> | ||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| <comment>This is a comment</comment> | ||
| </data> | ||
| There are any number of "resheader" rows that contain simple | ||
| name/value pairs. | ||
| Each data row contains a name, and value. The row also contains a | ||
| type or mimetype. Type corresponds to a .NET class that support | ||
| text/value conversion through the TypeConverter architecture. | ||
| Classes that don't support this are serialized and stored with the | ||
| mimetype set. | ||
| The mimetype is used for serialized objects, and tells the | ||
| ResXResourceReader how to depersist the object. This is currently not | ||
| extensible. For a given mimetype the value must be set accordingly: | ||
| Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| that the ResXResourceWriter will generate, however the reader can | ||
| read any of the formats listed below. | ||
| mimetype: application/x-microsoft.net.object.binary.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.soap.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| value : The object must be serialized into a byte array | ||
| : using a System.ComponentModel.TypeConverter | ||
| : and then encoded with base64 encoding. | ||
| --> | ||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| <xsd:element name="root" msdata:IsDataSet="true"> | ||
| <xsd:complexType> | ||
| <xsd:choice maxOccurs="unbounded"> | ||
| <xsd:element name="metadata"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| <xsd:attribute name="type" type="xsd:string" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="assembly"> | ||
| <xsd:complexType> | ||
| <xsd:attribute name="alias" type="xsd:string" /> | ||
| <xsd:attribute name="name" type="xsd:string" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="data"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="resheader"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:choice> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:schema> | ||
| <resheader name="resmimetype"> | ||
| <value>text/microsoft-resx</value> | ||
| </resheader> | ||
| <resheader name="version"> | ||
| <value>2.0</value> | ||
| </resheader> | ||
| <resheader name="reader"> | ||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <resheader name="writer"> | ||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <metadata name="ProductTypeID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
| <value>True</value> | ||
| </metadata> | ||
| <metadata name="ProductType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
| <value>True</value> | ||
| </metadata> | ||
| <metadata name="ProductTypeID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
| <value>True</value> | ||
| </metadata> | ||
| <metadata name="ProductType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
| <value>True</value> | ||
| </metadata> | ||
| </root> |
| @@ -0,0 +1,62 @@ | ||
| using Acme_Project.Business_Logic_Layer; | ||
| using Acme_Project.Data_Access_Layer; | ||
| 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 Acme_Project.Presentation_Layer.ProductTypes | ||
| { | ||
| public partial class frmUpdateProductTypes : Form | ||
| { | ||
| public frmUpdateProductTypes(_ProductType productType) | ||
| { | ||
| InitializeComponent(); | ||
| //Fill in the form | ||
| txtProductTypeID.Text = productType.ProductTypeID.ToString(); | ||
| txtProductType.Text = productType.ProductType; | ||
| } | ||
|
|
||
| private void btnUpdateProductTypes_Click(object sender, EventArgs e) | ||
| { | ||
| if (validateInput()) | ||
| { | ||
| //Create an object of the ProductType class. | ||
| var updateExistingProductType = new _ProductType(int.Parse(txtProductTypeID.Text), | ||
| txtProductType.Text); | ||
|
|
||
| using (var conn = ConnectionManager.DatabaseConnection()) | ||
| { | ||
| //Specify the Stored Procedure | ||
| using (var cmd = new SqlCommand("sp_ProductTypes_UpdateProductType", conn)) | ||
| { | ||
| cmd.CommandType = CommandType.StoredProcedure; | ||
| cmd.Parameters.AddWithValue("ProductTypeID", updateExistingProductType.ProductTypeID); | ||
| cmd.Parameters.AddWithValue("ProductType", updateExistingProductType.ProductType); | ||
|
|
||
| cmd.Transaction = conn.BeginTransaction(); | ||
| cmd.ExecuteNonQuery(); | ||
| cmd.Transaction.Commit(); | ||
| } | ||
| } | ||
| this.Close(); | ||
| } | ||
| } | ||
|
|
||
| private bool validateInput() | ||
| { | ||
| if (String.IsNullOrEmpty(txtProductType.Text)) | ||
| { | ||
| MessageBox.Show("Please enter the Product Type."); | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,120 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <root> | ||
| <!-- | ||
| Microsoft ResX Schema | ||
| Version 2.0 | ||
| The primary goals of this format is to allow a simple XML format | ||
| that is mostly human readable. The generation and parsing of the | ||
| various data types are done through the TypeConverter classes | ||
| associated with the data types. | ||
| Example: | ||
| ... ado.net/XML headers & schema ... | ||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| <resheader name="version">2.0</resheader> | ||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| </data> | ||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| <comment>This is a comment</comment> | ||
| </data> | ||
| There are any number of "resheader" rows that contain simple | ||
| name/value pairs. | ||
| Each data row contains a name, and value. The row also contains a | ||
| type or mimetype. Type corresponds to a .NET class that support | ||
| text/value conversion through the TypeConverter architecture. | ||
| Classes that don't support this are serialized and stored with the | ||
| mimetype set. | ||
| The mimetype is used for serialized objects, and tells the | ||
| ResXResourceReader how to depersist the object. This is currently not | ||
| extensible. For a given mimetype the value must be set accordingly: | ||
| Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| that the ResXResourceWriter will generate, however the reader can | ||
| read any of the formats listed below. | ||
| mimetype: application/x-microsoft.net.object.binary.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.soap.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| value : The object must be serialized into a byte array | ||
| : using a System.ComponentModel.TypeConverter | ||
| : and then encoded with base64 encoding. | ||
| --> | ||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| <xsd:element name="root" msdata:IsDataSet="true"> | ||
| <xsd:complexType> | ||
| <xsd:choice maxOccurs="unbounded"> | ||
| <xsd:element name="metadata"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| <xsd:attribute name="type" type="xsd:string" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="assembly"> | ||
| <xsd:complexType> | ||
| <xsd:attribute name="alias" type="xsd:string" /> | ||
| <xsd:attribute name="name" type="xsd:string" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="data"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="resheader"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:choice> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:schema> | ||
| <resheader name="resmimetype"> | ||
| <value>text/microsoft-resx</value> | ||
| </resheader> | ||
| <resheader name="version"> | ||
| <value>2.0</value> | ||
| </resheader> | ||
| <resheader name="reader"> | ||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <resheader name="writer"> | ||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| </root> |
| @@ -0,0 +1,120 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <root> | ||
| <!-- | ||
| Microsoft ResX Schema | ||
| Version 2.0 | ||
| The primary goals of this format is to allow a simple XML format | ||
| that is mostly human readable. The generation and parsing of the | ||
| various data types are done through the TypeConverter classes | ||
| associated with the data types. | ||
| Example: | ||
| ... ado.net/XML headers & schema ... | ||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| <resheader name="version">2.0</resheader> | ||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| </data> | ||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| <comment>This is a comment</comment> | ||
| </data> | ||
| There are any number of "resheader" rows that contain simple | ||
| name/value pairs. | ||
| Each data row contains a name, and value. The row also contains a | ||
| type or mimetype. Type corresponds to a .NET class that support | ||
| text/value conversion through the TypeConverter architecture. | ||
| Classes that don't support this are serialized and stored with the | ||
| mimetype set. | ||
| The mimetype is used for serialized objects, and tells the | ||
| ResXResourceReader how to depersist the object. This is currently not | ||
| extensible. For a given mimetype the value must be set accordingly: | ||
| Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| that the ResXResourceWriter will generate, however the reader can | ||
| read any of the formats listed below. | ||
| mimetype: application/x-microsoft.net.object.binary.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.soap.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| : and then encoded with base64 encoding. | ||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| value : The object must be serialized into a byte array | ||
| : using a System.ComponentModel.TypeConverter | ||
| : and then encoded with base64 encoding. | ||
| --> | ||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| <xsd:element name="root" msdata:IsDataSet="true"> | ||
| <xsd:complexType> | ||
| <xsd:choice maxOccurs="unbounded"> | ||
| <xsd:element name="metadata"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| <xsd:attribute name="type" type="xsd:string" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="assembly"> | ||
| <xsd:complexType> | ||
| <xsd:attribute name="alias" type="xsd:string" /> | ||
| <xsd:attribute name="name" type="xsd:string" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="data"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="resheader"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:choice> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:schema> | ||
| <resheader name="resmimetype"> | ||
| <value>text/microsoft-resx</value> | ||
| </resheader> | ||
| <resheader name="version"> | ||
| <value>2.0</value> | ||
| </resheader> | ||
| <resheader name="reader"> | ||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <resheader name="writer"> | ||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| </root> |