SVN r973
SVN-Revision: r973
This commit is contained in:
@@ -443,12 +443,16 @@ namespace Lskj.Control.Model
|
||||
public const int LabApiBtuton = 163;
|
||||
/// <summary>
|
||||
///超链接
|
||||
/// </ summary>
|
||||
/// </summary>
|
||||
public const int LabHyperlink = 164;
|
||||
/// <summary>
|
||||
///关联右键列
|
||||
/// </ summary>
|
||||
/// </summary>
|
||||
public const int LabRightlink = 165;
|
||||
/// <summary>
|
||||
///单据来源控件(弹出控件根据下拉框中的单据来源id加载数据)
|
||||
/// </summary>
|
||||
public const int LabBillSource = -11;
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:是否为Value类型</para>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace Lskj.Control.Model
|
||||
//{
|
||||
//}
|
||||
|
||||
if (model.ActionType == 0 && execResult)
|
||||
if (model.ActionType == 0 && execResult && !model.DisableSuccessfulPrompt)
|
||||
{
|
||||
MessageUtil.Show(string.IsNullOrEmpty(model.SuccessMsg) ? ResourceKeys.OperSuccess : model.SuccessMsg);
|
||||
}
|
||||
|
||||
@@ -319,6 +319,10 @@ namespace Lskj.Control.Model
|
||||
/// sql直接执行模式
|
||||
/// </summary>
|
||||
public bool SqlDirectExecution;
|
||||
/// <summary>
|
||||
/// sql执行成功不提示
|
||||
/// </summary>
|
||||
public bool DisableSuccessfulPrompt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -441,4 +445,6 @@ namespace Lskj.Control.Model
|
||||
this._resultSQL = item["ResultSQL"] + "";
|
||||
if (item.Table.Columns.Contains("ExecuteFirstCode"))
|
||||
this.ExecuteFirstCode = item["ExecuteFirstCode"] + "";
|
||||
if (item.Table.Columns.Contains("DuringExecutionMinimize"))
|
||||
this.DuringExecutionMinimize = string.IsNullOrWhiteSpace(item["DuringExecutionMinimize"] + "") ? false : "1".Equals(item["DuringExecutionMinimize"] + "");
|
||||
if
|
||||
@@ -152,6 +152,10 @@ namespace Lskj.Control.Model
|
||||
/// 是否为审核界面主表
|
||||
/// </summary>
|
||||
public bool isAuditMain = false;
|
||||
/// <summary>
|
||||
///单据特殊模块id(单据来源控件)
|
||||
/// </summary>
|
||||
public string BillSourceControlId = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -236,6 +240,10 @@ namespace Lskj.Control.Model
|
||||
/// </summary>
|
||||
public event KeyEventHandler OnDataFileRefrshCallBack;
|
||||
/// <summary>
|
||||
/// 打开来源模块
|
||||
/// </summary>
|
||||
public event EventHandler OpenDocumentSource;
|
||||
/// <summary>
|
||||
/// 控件Panel对象
|
||||
/// </summary>
|
||||
public XtraScrollableControl ParentPanel
|
||||
@@ -1578,6 +1586,10 @@ namespace Lskj.Control.Model
|
||||
case ControlType.LabCheckText:
|
||||
LabelCheckText labelCheckText = ctr as LabelCheckText;
|
||||
break;
|
||||
case ControlType.LabBillSource:
|
||||
LabelBillSourceComboxEdit billSourceComboxEdit = ctr as LabelBillSourceComboxEdit;
|
||||
billSourceComboxEdit.SetDataSource(table);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1699,7 +1711,7 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
else if (model.FieldName.EndsWith("operatedate", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
controlValue = DateTime.Now.ToString();
|
||||
controlValue = SqlHelper.ExecuteScalar("select getdate()")+"";//DateTime.Now.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1718,7 +1730,7 @@ namespace Lskj.Control.Model
|
||||
if (model.FieldName.ToLower().EndsWith("operatorname"))
|
||||
control.EditText = ERPInfo.Instance.UserName;
|
||||
if (model.FieldName.ToLower().EndsWith("operatedate"))
|
||||
control.EditText = DateTime.Now.ToString();
|
||||
control.EditText = SqlHelper.ExecuteScalar("select getdate()") + "";//DateTime.Now.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2516,7 +2528,7 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
else if (model.FieldName.EndsWith("operatedate", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
controlValue = DateTime.Now.ToString();
|
||||
controlValue = SqlHelper.ExecuteScalar("select getdate()") + ""; //DateTime.Now.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2563,8 +2575,9 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
else if (model.FieldName.EndsWith("operatedate", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
control.EditText = DateTime.Now.ToString();
|
||||
control.Model.Text = DateTime.Now.ToString();
|
||||
string date = SqlHelper.ExecuteScalar("select getdate()") + "";
|
||||
control.EditText = date; //DateTime.Now.ToString();
|
||||
control.Model.Text = date; //DateTime.Now.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3704,7 +3717,7 @@ namespace Lskj.Control.Model
|
||||
if (model.FieldName.ToLower().EndsWith("operatorname"))
|
||||
SetControlValue(model, ERPInfo.Instance.UserName);
|
||||
if (model.FieldName.ToLower().EndsWith("operatedate"))
|
||||
SetControlValue(model, DateTime.Now.ToString());
|
||||
SetControlValue(model, SqlHelper.ExecuteScalar("select getdate()") + "");//DateTime.Now.ToString()
|
||||
}
|
||||
|
||||
// 没有权限的控件设置为****
|
||||
@@ -4609,6 +4622,28 @@ namespace Lskj.Control.Model
|
||||
labApiButtonEdit.OnRefreshDataCallBack += new EventHandler(OnLabApiDataCallBack);
|
||||
baseControl = labApiButtonEdit;
|
||||
break;
|
||||
case ControlType.LabBillSource:
|
||||
LabelBillSourceComboxEdit billSourceComboxEdit = new LabelBillSourceComboxEdit();
|
||||
|
||||
billSourceComboxEdit.Button.Visible = true;
|
||||
billSourceComboxEdit.OpenDocumentSource += new EventHandler(OpenDocumentSource);
|
||||
|
||||
billSourceComboxEdit.clickAfterEmpty = model.clickAfterEmpty;
|
||||
billSourceComboxEdit.ValueMember =model.ValueMember;
|
||||
billSourceComboxEdit.ValueField = model.ValueMember;
|
||||
billSourceComboxEdit.TextField = model.TextMember;
|
||||
billSourceComboxEdit.FormKey = model.FieldName + "_" + model.FormKey;
|
||||
//billSourceComboxEdit.SetDataSource(dataSource);
|
||||
billSourceComboxEdit.TextEdit.SourceSQL = model.SourceSql;
|
||||
billSourceComboxEdit.TextEdit.SpeciesValue = ParentKey;
|
||||
billSourceComboxEdit.TextEdit.ControlObj = this;
|
||||
billSourceComboxEdit.TextEdit.KeyDown += new KeyEventHandler(OnTextEditKeyDown);
|
||||
//billSourceComboxEdit.TextEdit.TextChanged += new EventHandler(GetAutoSearcher_HandleSQL);
|
||||
//billSourceComboxEdit.TextEdit.TextChanged += new EventHandler(OnTextEditTextChanged);
|
||||
billSourceComboxEdit.TextEdit.HiddenValueChange += new EventHandler(OnTextEditTextChanged);
|
||||
if (!isLoadBorder) billSourceComboxEdit.TextEdit.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
baseControl = billSourceComboxEdit;
|
||||
break;
|
||||
case ControlType.LabText:
|
||||
case ControlType.LabTextInt:
|
||||
default:
|
||||
@@ -4941,7 +4976,7 @@ namespace Lskj.Control.Model
|
||||
else
|
||||
cond = ReplaceHelper.ReplaceSearchControlCond(cond, fieldValue);
|
||||
|
||||
// 带复选框控件构造sql语句时,假如没有值,则不构造查询条件
|
||||
// 带复选框控件构造sql语句时,假如没有值,则不构造查询条件
|
||||
if ((fieldTypeId == ControlType.LabCheckAutoSeacherText ||
|
||||
fieldTypeId == ControlType.LabCheckAutoSeacherValue ||
|
||||
fieldTypeId == ControlType.LabCheckBox ||
|
||||
@@ -6059,30 +6094,4 @@ namespace Lskj.Control.Model
|
||||
LabelDateEdit dateEdit = controlObj as LabelDateEdit;
|
||||
value = dateEdit.TextEdit.EditValue == null ? dateEdit.EditText : dateEdit.TextEdit.DateTime.ToString("yyyy-MM-dd");
|
||||
}
|
||||
else if (controlObj is LabelCheckEdit)
|
||||
{
|
||||
LabelCheckEdit checkEdit = controlObj as LabelCheckEdit;
|
||||
value = checkEdit.EditText;
|
||||
}
|
||||
else if (controlObj is LabelComboxEdit)
|
||||
{
|
||||
LabelComboxEdit autoEdit = controlObj as LabelComboxEdit;
|
||||
value = autoEdit.EditValue;
|
||||
}
|
||||
else if (controlObj is LabelTextEdit)
|
||||
{
|
||||
LabelTextEdit textIntEdit = controlObj as LabelTextEdit;
|
||||
if (textIntEdit != null) value = string.IsNullOrEmpty(textIntEdit.EditText) ? "0" : textIntEdit.EditText;
|
||||
}
|
||||
|
||||
defaultValue = defaultValue.Replace(item, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if
|
||||
@@ -113,6 +113,23 @@ namespace Lskj.Control.Model
|
||||
DataRowView dataRowView = this._sourceTreeList.GetDataRecordByNode(treeNode) as DataRowView;
|
||||
dataRows[i] = dataRowView != null ? dataRowView.Row : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//设置了复选框这个获取所有选中的节点行
|
||||
if (this._sourceTreeList.OptionsView.ShowCheckBoxes == true && this._sourceTreeList.OptionsSelection.MultiSelect == true && this._sourceTreeList.OptionsSelection.MultiSelectMode == TreeListMultiSelectMode.RowSelect)
|
||||
{
|
||||
List<TreeListNode> TreeListNodeList = this._sourceTreeList.GetAllCheckedNodes();
|
||||
dataRows = new DataRow[TreeListNodeList.Count];
|
||||
for (int i = 0; i < TreeListNodeList.Count; i++)
|
||||
{
|
||||
TreeListNode treeNode = TreeListNodeList[i];
|
||||
DataRowView dataRowView = this._sourceTreeList.GetDataRecordByNode(treeNode) as DataRowView;
|
||||
dataRows[i] = dataRowView != null ? dataRowView.Row : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return dataRows;
|
||||
}
|
||||
|
||||
@@ -199,33 +216,4 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:源树表格鼠标按下</para>
|
||||
/// <para>创建人:</para>
|
||||
/// <para>创建日期:2023-3-20 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
private void treeList_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
//this._sourceTreeList.AllowDrop = false;
|
||||
//this._targetGridView.GridControl.AllowDrop = true;
|
||||
|
||||
TreeList treelist = sender as TreeList;
|
||||
downHitInfo = null;
|
||||
_hitInfo = null;
|
||||
TreeListHitInfo hitInfo = treelist.CalcHitInfo(new Point(e.X, e.Y));
|
||||
|
||||
// if (Control.ModifierKeys != Keys.None) return;
|
||||
if (e.Button == MouseButtons.Left && hitInfo != null)
|
||||
{
|
||||
StaticControl.SourceDragGridView = null;
|
||||
this._draging = true;
|
||||
downHitInfo = hitInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/// <para>说明:源树表格鼠�
|
||||
Reference in New Issue
Block a user