Breaking Changes. Upgrade Script in Sql directory. Deployed

This commit is contained in:
unknown
2011-02-18 22:24:48 +05:30
parent d4cfa92848
commit 9ed5843dbd
86 changed files with 2616 additions and 2358 deletions

View File

@ -38,6 +38,7 @@
this.label4 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.btnCreateUSer = new System.Windows.Forms.Button();
this.btnMsr = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txtPassword
@ -46,16 +47,16 @@
this.txtPassword.Name = "txtPassword";
this.txtPassword.PasswordChar = '/';
this.txtPassword.Size = new System.Drawing.Size(162, 20);
this.txtPassword.TabIndex = 5;
this.txtPassword.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(28, 38);
this.label2.Location = new System.Drawing.Point(26, 38);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(70, 13);
this.label2.TabIndex = 6;
this.label2.Text = "old Password";
this.label2.Size = new System.Drawing.Size(72, 13);
this.label2.TabIndex = 7;
this.label2.Text = "Old Password";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtUsername
@ -64,7 +65,7 @@
this.txtUsername.Location = new System.Drawing.Point(104, 12);
this.txtUsername.Name = "txtUsername";
this.txtUsername.Size = new System.Drawing.Size(162, 20);
this.txtUsername.TabIndex = 3;
this.txtUsername.TabIndex = 10;
//
// label1
//
@ -72,7 +73,7 @@
this.label1.Location = new System.Drawing.Point(38, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 13);
this.label1.TabIndex = 4;
this.label1.TabIndex = 6;
this.label1.Text = "User Name";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
@ -82,7 +83,7 @@
this.txtnewPassword.Name = "txtnewPassword";
this.txtnewPassword.PasswordChar = '/';
this.txtnewPassword.Size = new System.Drawing.Size(162, 20);
this.txtnewPassword.TabIndex = 7;
this.txtnewPassword.TabIndex = 1;
//
// label3
//
@ -100,7 +101,7 @@
this.txtConfirmPassword.Name = "txtConfirmPassword";
this.txtConfirmPassword.PasswordChar = '/';
this.txtConfirmPassword.Size = new System.Drawing.Size(162, 20);
this.txtConfirmPassword.TabIndex = 9;
this.txtConfirmPassword.TabIndex = 2;
//
// label4
//
@ -108,35 +109,46 @@
this.label4.Location = new System.Drawing.Point(7, 90);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(91, 13);
this.label4.TabIndex = 10;
this.label4.TabIndex = 9;
this.label4.Text = "Confirm Password";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button2
//
this.button2.Location = new System.Drawing.Point(220, 116);
this.button2.Location = new System.Drawing.Point(211, 116);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(46, 23);
this.button2.TabIndex = 12;
this.button2.Size = new System.Drawing.Size(55, 23);
this.button2.TabIndex = 5;
this.button2.Text = "Ca&ncel";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// btnCreateUSer
//
this.btnCreateUSer.Location = new System.Drawing.Point(104, 116);
this.btnCreateUSer.Location = new System.Drawing.Point(84, 116);
this.btnCreateUSer.Name = "btnCreateUSer";
this.btnCreateUSer.Size = new System.Drawing.Size(110, 23);
this.btnCreateUSer.TabIndex = 11;
this.btnCreateUSer.Size = new System.Drawing.Size(121, 23);
this.btnCreateUSer.TabIndex = 4;
this.btnCreateUSer.Text = "&Change Password";
this.btnCreateUSer.UseVisualStyleBackColor = true;
this.btnCreateUSer.Click += new System.EventHandler(this.btnCreateUSer_Click);
//
// btnMsr
//
this.btnMsr.Location = new System.Drawing.Point(12, 116);
this.btnMsr.Name = "btnMsr";
this.btnMsr.Size = new System.Drawing.Size(66, 23);
this.btnMsr.TabIndex = 3;
this.btnMsr.Text = "Msr";
this.btnMsr.UseVisualStyleBackColor = true;
this.btnMsr.Click += new System.EventHandler(this.btnMsr_Click);
//
// ChangePassword
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(287, 185);
this.Controls.Add(this.btnMsr);
this.Controls.Add(this.button2);
this.Controls.Add(this.btnCreateUSer);
this.Controls.Add(this.txtConfirmPassword);
@ -169,5 +181,6 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button btnCreateUSer;
private System.Windows.Forms.Button btnMsr;
}
}

View File

@ -71,10 +71,37 @@ namespace Tanshu.Accounts.PointOfSale
userEntity.Name = txtUsername.Text.Trim();
userEntity.Password = Tanshu.Common.Md5.Hash(txtPassword.Text.Trim(), "v2");
if (UserBI.ValidateUser(userEntity.Name, userEntity.Password))
if (UserBI.ValidateUser(userEntity.Name, userEntity.Password) != null)
return UserBI.ChangePassword(userEntity, Tanshu.Common.Md5.Hash(txtnewPassword.Text.Trim(), "v2"));
else
return false;
}
private void btnMsr_Click(object sender, EventArgs e)
{
User user = new User();
user.Name = txtUsername.Text.Trim();
user.Password = Tanshu.Common.Md5.Hash(txtPassword.Text.Trim(), "v2");
if (UserBI.ValidateUser(user.Name, user.Password) == null)
return;
using (var frm = new MsrLoginForm(true))
{
frm.ShowDialog();
string userName;
frm.UserName(out userName);
if (userName != null || userName != string.Empty)
{
if (MessageBox.Show("Update Msr Card", "Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
user = UserBI.GetUserFromName(user.Name);
user.MsrString = userName;
UserBI.Update(user);
MessageBox.Show("Msr Card Updated");
this.Close();
}
}
}
}
}
}