SVN r1127
SVN-Revision: r1127
This commit is contained in:
@@ -530,7 +530,7 @@ namespace Lskj.Control.Model
|
|||||||
GridColumnModel model = col.Tag as GridColumnModel;
|
GridColumnModel model = col.Tag as GridColumnModel;
|
||||||
if (model == null) continue;
|
if (model == null) continue;
|
||||||
string tempSql = 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});",
|
string tempSql = 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 != null ? col.OwnerBand.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left : false, model.FieldText, saveFieldName, fieldValue);
|
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 ? 1 : 0 : 0, model.FieldText, saveFieldName, fieldValue);
|
||||||
sBuilder.Append(tempSql);
|
sBuilder.Append(tempSql);
|
||||||
}
|
}
|
||||||
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
||||||
@@ -621,8 +621,8 @@ namespace Lskj.Control.Model
|
|||||||
GridColumnModel model = col.Tag as GridColumnModel;
|
GridColumnModel model = col.Tag as GridColumnModel;
|
||||||
DataRow a = customTable.Rows.Cast<DataRow>().FirstOrDefault(x => col.Name.Equals(x["fieldName"] + "", StringComparison.OrdinalIgnoreCase));
|
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});",
|
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 != 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}';",
|
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 ? 1 : 0 : 0, 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);
|
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 ? 1 : 0 : 0, updateField);
|
||||||
sBuilder.Append(tempSql);
|
sBuilder.Append(tempSql);
|
||||||
}
|
}
|
||||||
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
||||||
@@ -694,7 +694,7 @@ namespace Lskj.Control.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
string tempSql = string.Format(@"insert into {8}(formkey,fieldname,username,orderid,isvisible,operatorid,operatorName,operatedate,fieldWidth,IfFixColumn {10}) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',getdate(),'{7}','{9}' {11});",
|
string tempSql = string.Format(@"insert into {8}(formkey,fieldname,username,orderid,isvisible,operatorid,operatorName,operatedate,fieldWidth,IfFixColumn {10}) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',getdate(),'{7}','{9}' {11});",
|
||||||
key, col.FieldName, col.Caption.Replace("'", "''"), col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left, saveFieldName, fieldValue);
|
key, col.FieldName, col.Caption.Replace("'", "''"), col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left ? 1 : 0, saveFieldName, fieldValue);
|
||||||
sBuilder.Append(tempSql);
|
sBuilder.Append(tempSql);
|
||||||
}
|
}
|
||||||
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
||||||
@@ -804,8 +804,8 @@ namespace Lskj.Control.Model
|
|||||||
|
|
||||||
DataRow a = customTable.Rows.Cast<DataRow>().FirstOrDefault(x => col.Name.Equals(x["fieldName"] + "", StringComparison.OrdinalIgnoreCase));
|
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 {10}) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',getdate(),'{7}','{9}' {11});",
|
string tempSql = a == null ? string.Format(@"insert into {8}(formkey,fieldname,username,orderid,isvisible,operatorid,operatorName,operatedate,fieldWidth,IfFixColumn {10}) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',getdate(),'{7}','{9}' {11});",
|
||||||
key, col.FieldName, col.Caption.Replace("'", "''"), col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left, 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.Replace("'", "''"), col.VisibleIndex, Convert.ToInt32(col.Visible), ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, col.Width, ResourceKeys.SettingTableName, col.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left ? 1 : 0, 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.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left, updateField);
|
col.VisibleIndex, col.Width, Convert.ToInt32(col.Visible), key, col.FieldName, ERPInfo.Instance.UserId, ResourceKeys.SettingTableName, col.Fixed == DevExpress.XtraGrid.Columns.FixedStyle.Left ? 1 : 0, updateField);
|
||||||
sBuilder.Append(tempSql);
|
sBuilder.Append(tempSql);
|
||||||
}
|
}
|
||||||
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
return BaseImpl.ExecSqlValue(sBuilder.ToString()) > 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user