SVN-Revision: r973
This commit is contained in:
cyf
2025-09-09 01:59:56 +00:00
parent e9603c2287
commit c3b8d39f9d
13 changed files with 879 additions and 178 deletions
+25 -25
View File
@@ -614,7 +614,7 @@ namespace Lskj.Control.Model
GridColumnModel model = col.Tag as GridColumnModel;
DataRow a = customTable.Rows.Cast<DataRow>().FirstOrDefault(x => col.Name.Equals(x["fieldName"] + "", StringComparison.OrdinalIgnoreCase));
string tempSql = a == null ? string.Format(@"insert into {8}(formkey,fieldname,username,orderid,isvisible,operatorid,operatorName,operatedate,fieldWidth,IfFixColumn,FieldText {11}) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',getdate(),'{7}','{9}','{10}' {12});",
key, col.FieldName, col.Caption, col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.OwnerBand.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left, model.FieldText, saveFieldName, fieldValue) : string.Format(@"update {6} set orderid='{0}',fieldWidth='{1}',isvisible={2},IfFixColumn='{7}' {8} where formkey='{3}' and fieldname='{4}' and operatorid='{5}';",
key, col.FieldName, col.Caption, col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.OwnerBand != null ? col.OwnerBand.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left : false, model.FieldText, saveFieldName, fieldValue) : string.Format(@"update {6} set orderid='{0}',fieldWidth='{1}',isvisible={2},IfFixColumn='{7}' {8} where formkey='{3}' and fieldname='{4}' and operatorid='{5}';",
col.VisibleIndex, col.Width, Convert.ToInt32(col.Visible), key, col.FieldName, ERPInfo.Instance.UserId, ResourceKeys.SettingTableName, col.OwnerBand != null ? col.OwnerBand.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left : false, updateField);
sBuilder.Append(tempSql);
}
@@ -2183,7 +2183,7 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabDateTime ||
model.FieldType == ControlType.LabDateTimeShort ||
model.FieldType == ControlType.LabTime ||
model.FieldType == ControlType.LabShortTime)&& (cell == null&&cell.StringCellValue!=null && cell.CellType == CellType.Blank && string.IsNullOrWhiteSpace(cell+"")))
model.FieldType == ControlType.LabShortTime) && (cell == null && cell.StringCellValue != null && cell.CellType == CellType.Blank && string.IsNullOrWhiteSpace(cell + "")))
{
//日期框如果值是空,就直接跳过。赋空值("")会报错
continue;
@@ -2242,21 +2242,21 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId
||(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
))
{
bool isEmpty = model.CanNull;
string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport);
// if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
//model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
// {
// string[] cellText = cell.ToString().Split(',');
// foreach (string cellValue in cellText)
// {
// fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
// }
// fieldValue = fieldValue.TrimEnd(',');
// }
// if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
//model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
// {
// string[] cellText = cell.ToString().Split(',');
// foreach (string cellValue in cellText)
// {
// fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
// }
// fieldValue = fieldValue.TrimEnd(',');
// }
if (string.IsNullOrEmpty(fieldValue))
{
if (isEmpty)
@@ -2593,16 +2593,16 @@ namespace Lskj.Control.Model
{
bool isEmpty = model.CanNull;
string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport);
// if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
//model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
// {
// string[] cellText = cell.ToString().Split(',');
// foreach (string cellValue in cellText)
// {
// fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
// }
// fieldValue = fieldValue.TrimEnd(',');
// }
// if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
//model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
// {
// string[] cellText = cell.ToString().Split(',');
// foreach (string cellValue in cellText)
// {
// fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
// }
// fieldValue = fieldValue.TrimEnd(',');
// }
if (string.IsNullOrEmpty(fieldValue))
{
if (isEmpty)
@@ -3013,7 +3013,7 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabMultiSelectValue ||
model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue ||
model.FieldType == ControlType.LabSelectReturnId||
model.FieldType == ControlType.LabSelectReturnId ||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
))
{
@@ -3428,7 +3428,7 @@ namespace Lskj.Control.Model
string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) ||model.FieldType == ControlType.LabSelectReturnIdNew)
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);