SVN r420
SVN-Revision: r420
This commit is contained in:
@@ -1291,7 +1291,8 @@ namespace Lskj.PubProductSmart
|
|||||||
//反写相同名字的列
|
//反写相同名字的列
|
||||||
if (dataRow.Table.Columns.Contains(model.DbName))
|
if (dataRow.Table.Columns.Contains(model.DbName))
|
||||||
{
|
{
|
||||||
dataRow[model.DbName] = baseControl.EditText;
|
string Value = this.GetControlValue(model.DbName);
|
||||||
|
dataRow[model.DbName] = Value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1624,10 +1625,10 @@ namespace Lskj.PubProductSmart
|
|||||||
keyList.Add("model");
|
keyList.Add("model");
|
||||||
sqlBuilder.Append(string.Format("{0} = N'{1}',", "model", focusRow["model"] + ""));
|
sqlBuilder.Append(string.Format("{0} = N'{1}',", "model", focusRow["model"] + ""));
|
||||||
}
|
}
|
||||||
if (sysSetModel.ZhSxdbName.Equals(1) && focusRow.Table.Columns.Contains("productDe") && !keyList.Contains("productDe"))//反写综合属性
|
if (sysSetModel.ZhSxdbName.Equals(1) && focusRow.Table.Columns.Contains("productde") && !keyList.Contains("productde"))//反写综合属性
|
||||||
{
|
{
|
||||||
keyList.Add("productDe");
|
keyList.Add("productde");
|
||||||
sqlBuilder.Append(string.Format("{0} = N'{1}',", "productDe", focusRow["productDe"] + ""));
|
sqlBuilder.Append(string.Format("{0} = N'{1}',", "productde", focusRow["productde"] + ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1797,11 +1798,11 @@ namespace Lskj.PubProductSmart
|
|||||||
keyBuilder.Append(string.Format("{0},", "model"));
|
keyBuilder.Append(string.Format("{0},", "model"));
|
||||||
valueBuilder.Append(string.Format("N'{0}',", focusRow["model"] + ""));
|
valueBuilder.Append(string.Format("N'{0}',", focusRow["model"] + ""));
|
||||||
}
|
}
|
||||||
if (sysSetModel.ZhSxdbName.Equals(1) && focusRow.Table.Columns.Contains("productDe") && !keyList.Contains("productDe"))//反写综合属性
|
if (sysSetModel.ZhSxdbName.Equals(1) && focusRow.Table.Columns.Contains("productde") && !keyList.Contains("productde"))//反写综合属性
|
||||||
{
|
{
|
||||||
keyList.Add("productDe");
|
keyList.Add("productde");
|
||||||
keyBuilder.Append(string.Format("{0},", "productDe"));
|
keyBuilder.Append(string.Format("{0},", "productde"));
|
||||||
valueBuilder.Append(string.Format("N'{0}',", focusRow["productDe"] + ""));
|
valueBuilder.Append(string.Format("N'{0}',", focusRow["productde"] + ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2197,32 +2198,4 @@ namespace Lskj.PubProductSmart
|
|||||||
// 只允许输入一个负号
|
// 只允许输入一个负号
|
||||||
if ((e.KeyChar == '-') && ((sender as TextEdit).Text.IndexOf('-') > -1))
|
if ((e.KeyChar == '-') && ((sender as TextEdit).Text.IndexOf('-') > -1))
|
||||||
{
|
{
|
||||||
e.Handled = true;
|
e.Handl
|
||||||
}
|
|
||||||
// 只允许输入一个百分号
|
|
||||||
if ((e.KeyChar == '%') && ((sender as TextEdit).Text.IndexOf('%') > -1))
|
|
||||||
{
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 限制數值框粘貼不能粘貼中文
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void OnIntEditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e)
|
|
||||||
{
|
|
||||||
string newText = e.NewValue as string;
|
|
||||||
|
|
||||||
|
|
||||||
// 第一个输入负号不会取消,出现了千位分隔符不会取消更改,末尾为百分号不会取消
|
|
||||||
if (!newText.Equals("-") && !string.IsNullOrEmpty(newText) && !Regex.IsMatch(newText, @"^(?:-(?:[0-9]+(?:,[0-9]{3})*(?:\.[0-9]*)?)|[0-9]+(?:,[0-9]{3})*(?:\.[0-9]*)?)(?:%)?$"))
|
|
||||||
{
|
|
||||||
e.Cancel = true; // 取消这次更改
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user