Chore: Removed Waiter as it was not ever used.
Refactor: Changed the user list form to a normal form. Feature: Service Charge disabled setting removes it from the Product Form.
This commit is contained in:
@ -36,15 +36,17 @@
|
||||
this.btnDelete = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.txtRetype = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 13);
|
||||
this.label1.Location = new System.Drawing.Point(12, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(60, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "User Name";
|
||||
//
|
||||
// txtUsername
|
||||
@ -58,63 +60,83 @@
|
||||
//
|
||||
this.txtPassword.Location = new System.Drawing.Point(78, 38);
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.PasswordChar = '/';
|
||||
this.txtPassword.Size = new System.Drawing.Size(188, 20);
|
||||
this.txtPassword.TabIndex = 1;
|
||||
this.txtPassword.UseSystemPasswordChar = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 39);
|
||||
this.label2.Location = new System.Drawing.Point(19, 38);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(53, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "Password";
|
||||
//
|
||||
// chkLocked
|
||||
//
|
||||
this.chkLocked.AutoSize = true;
|
||||
this.chkLocked.Location = new System.Drawing.Point(78, 65);
|
||||
this.chkLocked.Location = new System.Drawing.Point(78, 90);
|
||||
this.chkLocked.Name = "chkLocked";
|
||||
this.chkLocked.Size = new System.Drawing.Size(82, 17);
|
||||
this.chkLocked.TabIndex = 2;
|
||||
this.chkLocked.TabIndex = 3;
|
||||
this.chkLocked.Text = "Locked Out";
|
||||
this.chkLocked.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
this.btnDelete.Location = new System.Drawing.Point(96, 88);
|
||||
this.btnDelete.Location = new System.Drawing.Point(96, 113);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(78, 23);
|
||||
this.btnDelete.TabIndex = 9;
|
||||
this.btnDelete.TabIndex = 5;
|
||||
this.btnDelete.Text = "&Delete";
|
||||
this.btnDelete.UseVisualStyleBackColor = true;
|
||||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Location = new System.Drawing.Point(180, 88);
|
||||
this.btnCancel.Location = new System.Drawing.Point(180, 113);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(85, 23);
|
||||
this.btnCancel.TabIndex = 10;
|
||||
this.btnCancel.TabIndex = 6;
|
||||
this.btnCancel.Text = "&Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(12, 88);
|
||||
this.btnSave.Location = new System.Drawing.Point(12, 113);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(78, 23);
|
||||
this.btnSave.TabIndex = 11;
|
||||
this.btnSave.TabIndex = 4;
|
||||
this.btnSave.Text = "&Save";
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// txtRetype
|
||||
//
|
||||
this.txtRetype.Location = new System.Drawing.Point(78, 65);
|
||||
this.txtRetype.Name = "txtRetype";
|
||||
this.txtRetype.Size = new System.Drawing.Size(188, 20);
|
||||
this.txtRetype.TabIndex = 2;
|
||||
this.txtRetype.UseSystemPasswordChar = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(31, 65);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(41, 13);
|
||||
this.label3.TabIndex = 9;
|
||||
this.label3.Text = "Retype";
|
||||
//
|
||||
// UserForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(300, 136);
|
||||
this.ClientSize = new System.Drawing.Size(300, 148);
|
||||
this.Controls.Add(this.txtRetype);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnDelete);
|
||||
@ -126,8 +148,8 @@
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "UserForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "User Form";
|
||||
this.Load += new System.EventHandler(this.NewUser_Load);
|
||||
this.Text = "User";
|
||||
this.Load += new System.EventHandler(this.UserForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -143,5 +165,7 @@
|
||||
private System.Windows.Forms.Button btnDelete;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.TextBox txtRetype;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
@ -31,60 +31,60 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
btnCancel_Click(sender, e);
|
||||
}
|
||||
|
||||
private void NewUser_Load(object sender, EventArgs e)
|
||||
private void UserForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (_user == null)
|
||||
return;
|
||||
txtUsername.Text = _user.Name;
|
||||
txtPassword.Text = _user.Password;
|
||||
txtRetype.Text = _user.Password;
|
||||
chkLocked.Checked = _user.LockedOut;
|
||||
}
|
||||
|
||||
private bool Save()
|
||||
private void Save()
|
||||
{
|
||||
if (_user == null)
|
||||
_user = new User();
|
||||
_user.Name = txtUsername.Text.Trim();
|
||||
if (_user.Password != txtPassword.Text.Trim())
|
||||
_user.Password = Common.Md5.Hash(txtPassword.Text.Trim(), "v2");
|
||||
_user.LockedOut = (chkLocked.Checked == true ? true : false);
|
||||
if (_user.UserID == Guid.Empty)
|
||||
using (var bi = new UserBI())
|
||||
{
|
||||
using (var bi = new UserBI())
|
||||
{
|
||||
if (_user == null)
|
||||
_user = new User();
|
||||
else
|
||||
_user = bi.Get(x => x.UserID == _user.UserID);
|
||||
|
||||
_user.Name = txtUsername.Text.Trim();
|
||||
if (_user.Password != txtPassword.Text.Trim())
|
||||
_user.Password = Common.Md5.Hash(txtPassword.Text.Trim(), "v2");
|
||||
_user.LockedOut = (chkLocked.Checked == true ? true : false);
|
||||
|
||||
if (_user.UserID == Guid.Empty)
|
||||
bi.Insert(_user);
|
||||
bi.SaveChanges();
|
||||
}
|
||||
else
|
||||
using (var bi = new UserBI())
|
||||
{
|
||||
else
|
||||
bi.Update(_user);
|
||||
bi.SaveChanges();
|
||||
}
|
||||
return true;
|
||||
bi.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!ValidateValues())
|
||||
if (txtUsername.Text.Trim() == "")
|
||||
{
|
||||
MessageBox.Show("Missing Information: Please check the form.");
|
||||
MessageBox.Show("Username cannot be blank.");
|
||||
txtUsername.Focus();
|
||||
}
|
||||
else if (txtPassword.Text.Trim() != txtRetype.Text.Trim())
|
||||
{
|
||||
MessageBox.Show("Passwords do not match.");
|
||||
txtPassword.Focus();
|
||||
}
|
||||
else if (string.IsNullOrEmpty(txtPassword.Text.Trim()))
|
||||
{
|
||||
MessageBox.Show("Password cannot be empty.");
|
||||
txtPassword.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
Save();
|
||||
btnCancel_Click(sender, e);
|
||||
}
|
||||
}
|
||||
private bool ValidateValues()
|
||||
{
|
||||
if (txtUsername.Text.Trim() == "")
|
||||
return false;
|
||||
if (txtPassword.Text.Trim() == "")
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
187
Tanshu.Accounts.PointOfSale/User Management/UserListForm.Designer.cs
generated
Normal file
187
Tanshu.Accounts.PointOfSale/User Management/UserListForm.Designer.cs
generated
Normal file
@ -0,0 +1,187 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class UserListForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form 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.components = new System.ComponentModel.Container();
|
||||
this.btnAdd = new System.Windows.Forms.Button();
|
||||
this.btnEdit = new System.Windows.Forms.Button();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.dgvUsers = new System.Windows.Forms.DataGridView();
|
||||
this.bsList = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Password = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.MsrString = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.LockedOut = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.UserGroups = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsList)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnAdd.Location = new System.Drawing.Point(12, 255);
|
||||
this.btnAdd.Name = "btnAdd";
|
||||
this.btnAdd.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnAdd.TabIndex = 68;
|
||||
this.btnAdd.Text = "&Add";
|
||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
||||
//
|
||||
// btnEdit
|
||||
//
|
||||
this.btnEdit.AccessibleName = "Done";
|
||||
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnEdit.Location = new System.Drawing.Point(93, 255);
|
||||
this.btnEdit.Name = "btnEdit";
|
||||
this.btnEdit.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnEdit.TabIndex = 62;
|
||||
this.btnEdit.Text = "&Edit";
|
||||
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.AccessibleName = "Done";
|
||||
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnExit.Location = new System.Drawing.Point(575, 255);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnExit.TabIndex = 61;
|
||||
this.btnExit.Text = "E&xit";
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// dgvUsers
|
||||
//
|
||||
this.dgvUsers.AllowUserToAddRows = false;
|
||||
this.dgvUsers.AllowUserToDeleteRows = false;
|
||||
this.dgvUsers.AllowUserToResizeRows = false;
|
||||
this.dgvUsers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dgvUsers.AutoGenerateColumns = false;
|
||||
this.dgvUsers.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.dgvUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.nameDataGridViewTextBoxColumn,
|
||||
this.Password,
|
||||
this.MsrString,
|
||||
this.LockedOut,
|
||||
this.UserGroups});
|
||||
this.dgvUsers.DataSource = this.bsList;
|
||||
this.dgvUsers.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
|
||||
this.dgvUsers.Location = new System.Drawing.Point(12, 12);
|
||||
this.dgvUsers.MultiSelect = false;
|
||||
this.dgvUsers.Name = "dgvUsers";
|
||||
this.dgvUsers.ReadOnly = true;
|
||||
this.dgvUsers.RowHeadersVisible = false;
|
||||
this.dgvUsers.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvUsers.RowTemplate.Height = 24;
|
||||
this.dgvUsers.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvUsers.Size = new System.Drawing.Size(638, 237);
|
||||
this.dgvUsers.TabIndex = 74;
|
||||
this.dgvUsers.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.dgvUsers_CellFormatting);
|
||||
//
|
||||
// bsList
|
||||
//
|
||||
this.bsList.DataSource = typeof(Tanshu.Accounts.Entities.Auth.User);
|
||||
//
|
||||
// nameDataGridViewTextBoxColumn
|
||||
//
|
||||
this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name";
|
||||
this.nameDataGridViewTextBoxColumn.HeaderText = "Name";
|
||||
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
|
||||
this.nameDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.nameDataGridViewTextBoxColumn.Width = 60;
|
||||
//
|
||||
// unitsDataGridViewTextBoxColumn
|
||||
//
|
||||
this.Password.DataPropertyName = "Password";
|
||||
this.Password.HeaderText = "Password";
|
||||
this.Password.Name = "Password";
|
||||
this.Password.ReadOnly = true;
|
||||
this.Password.Width = 78;
|
||||
//
|
||||
// MsrString
|
||||
//
|
||||
this.MsrString.DataPropertyName = "MsrString";
|
||||
this.MsrString.HeaderText = "Msr";
|
||||
this.MsrString.Name = "MsrString";
|
||||
this.MsrString.ReadOnly = true;
|
||||
this.MsrString.Width = 30;
|
||||
//
|
||||
// LockedOut
|
||||
//
|
||||
this.LockedOut.DataPropertyName = "LockedOut";
|
||||
this.LockedOut.HeaderText = "Locked";
|
||||
this.LockedOut.Name = "LockedOut";
|
||||
this.LockedOut.ReadOnly = true;
|
||||
this.LockedOut.Width = 49;
|
||||
//
|
||||
// UserGroups
|
||||
//
|
||||
this.UserGroups.DataPropertyName = "UserGroups";
|
||||
this.UserGroups.HeaderText = "Groups";
|
||||
this.UserGroups.Name = "UserGroups";
|
||||
this.UserGroups.ReadOnly = true;
|
||||
this.UserGroups.Width = 66;
|
||||
//
|
||||
// UserListForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(662, 342);
|
||||
this.Controls.Add(this.dgvUsers);
|
||||
this.Controls.Add(this.btnAdd);
|
||||
this.Controls.Add(this.btnEdit);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "UserListForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Users";
|
||||
this.Load += new System.EventHandler(this.UserListForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsList)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal System.Windows.Forms.Button btnAdd;
|
||||
internal System.Windows.Forms.Button btnEdit;
|
||||
internal System.Windows.Forms.Button btnExit;
|
||||
private System.Windows.Forms.DataGridView dgvUsers;
|
||||
private System.Windows.Forms.BindingSource bsList;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Password;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn MsrString;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn LockedOut;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserGroups;
|
||||
}
|
||||
}
|
||||
91
Tanshu.Accounts.PointOfSale/User Management/UserListForm.cs
Normal file
91
Tanshu.Accounts.PointOfSale/User Management/UserListForm.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Entities;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using System.Collections.Generic;
|
||||
using Tanshu.Accounts.Entities.Auth;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class UserListForm : Form
|
||||
{
|
||||
private IList<User> _list;
|
||||
public UserListForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var frm = new UserForm(null))
|
||||
frm.ShowDialog();
|
||||
using (var bi = new UserBI())
|
||||
_list = bi.List();
|
||||
bsList.DataSource = _list;
|
||||
}
|
||||
|
||||
private void UserListForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
ShowGrid();
|
||||
}
|
||||
private void ShowGrid()
|
||||
{
|
||||
using (var bi = new UserBI())
|
||||
_list = bi.List();
|
||||
bsList.DataSource = _list;
|
||||
}
|
||||
|
||||
private void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
var id = ((User)bsList.Current).UserID;
|
||||
using (var frm = new UserForm(id))
|
||||
frm.ShowDialog();
|
||||
using (var bi = new UserBI())
|
||||
_list = bi.List();
|
||||
bsList.DataSource = _list;
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void dgvUsers_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
var data = dgvUsers.Rows[e.RowIndex].DataBoundItem as User;
|
||||
if (data == null)
|
||||
return;
|
||||
if (e.ColumnIndex == dgvUsers.Columns["Password"].Index)
|
||||
{
|
||||
e.Value = "******";
|
||||
}
|
||||
|
||||
if (e.ColumnIndex == dgvUsers.Columns["MsrString"].Index)
|
||||
{
|
||||
e.Value = !string.IsNullOrEmpty(data.MsrString);
|
||||
}
|
||||
|
||||
if (e.ColumnIndex == dgvUsers.Columns["UserGroups"].Index)
|
||||
{
|
||||
e.Value = string.Join(", ", data.UserGroups.Select(x => x.Group.Name).ToArray());
|
||||
}
|
||||
|
||||
var tax = e.Value as Tax;
|
||||
if (tax != null)
|
||||
{
|
||||
e.Value = string.Format("{1:P} - {0}", tax.Name, tax.Rate); ;
|
||||
return;
|
||||
}
|
||||
var productGroup = e.Value as ProductGroup;
|
||||
if (productGroup != null)
|
||||
{
|
||||
e.Value = productGroup.Name;
|
||||
}
|
||||
}
|
||||
private void chkIsActive_CheckStateChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
132
Tanshu.Accounts.PointOfSale/User Management/UserListForm.resx
Normal file
132
Tanshu.Accounts.PointOfSale/User Management/UserListForm.resx
Normal file
@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="MsrString.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="LockedOut.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserGroups.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bsList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user