SVN r907
SVN-Revision: r907
This commit is contained in:
@@ -498,7 +498,6 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
|
||||
baseControl.Required = model.IsEmpty;
|
||||
model.IsEmpty = !model.ReadOnly;
|
||||
baseControl.ReadOnly = model.ReadOnly;
|
||||
baseControl.Tag = model;
|
||||
baseControl.TabIndex = model.TabOrder;
|
||||
@@ -1605,7 +1604,20 @@ namespace Lskj.Control.Model
|
||||
this.SetUnionAncCalcControl(baseControl);
|
||||
}
|
||||
}
|
||||
|
||||
//设置被必填条件所影响的控件状态
|
||||
//ControlModel[] requiredcontrols = this.mControlList.Where(x => !string.IsNullOrEmpty(x.RequiredCond) && x.MustIn).ToArray();
|
||||
//foreach (ControlModel item in requiredcontrols)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string requiredCond = this.ReplaceControlValue(item.RequiredCond);
|
||||
// BaseUserControl control = FindControl(item);
|
||||
// control.Required = item.IsEmpty = item.MustIn ? ("true".Equals(ValidateCond(requiredCond, null) + "", StringComparison.OrdinalIgnoreCase)) : item.MustIn;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// }
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -2980,9 +2992,9 @@ namespace Lskj.Control.Model
|
||||
if (isTip) MessageUtil.Show(ResourceKeys.SaveSuccess);
|
||||
#endregion
|
||||
#region 保存成功后上传附件
|
||||
string idValue = primaryValue;
|
||||
try
|
||||
{
|
||||
string idValue = primaryValue;
|
||||
if (SystemModel != null && !string.IsNullOrWhiteSpace(SystemModel.AttachmentAssociated))
|
||||
{
|
||||
idValue = GetControlValue(SystemModel.AttachmentAssociated);
|
||||
@@ -3027,7 +3039,12 @@ namespace Lskj.Control.Model
|
||||
}
|
||||
else
|
||||
{
|
||||
string updateSql = $"update QMS_wenjiangenggaitab set fileId = '{fileId}' where qms_wjgg_billdocument_id = '{primaryValue}'";
|
||||
string qms_wjgg_billdocument_id = SqlHelper.ExecuteScalar($"select qms_wjgg_billdocument_id from QMS_wenjiangenggaitab where qms_wjgg_billdocument_id = '{idValue}'") + "";
|
||||
if (string.IsNullOrEmpty(idValue) || string.IsNullOrEmpty(qms_wjgg_billdocument_id))
|
||||
{
|
||||
throw new Exception($"数据保存失败,请重试");
|
||||
}
|
||||
string updateSql = $"update QMS_wenjiangenggaitab set fileId = '{fileId}' where qms_wjgg_billdocument_id = '{idValue}'";
|
||||
SqlHelper.ExecuteNonQuery(updateSql);
|
||||
}
|
||||
}
|
||||
@@ -3043,7 +3060,7 @@ namespace Lskj.Control.Model
|
||||
MessageUtil.Show(ex.Message);
|
||||
if (isAdd)
|
||||
{
|
||||
BaseImpl.ExecSqlValue($"delete QMS_wenjiangenggaitab where qms_wjgg_billdocument_Id = '{primaryValue}'");
|
||||
BaseImpl.ExecSqlValue($"delete QMS_wenjiangenggaitab where qms_wjgg_billdocument_Id = '{idValue}'");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3473,13 +3490,7 @@ namespace Lskj.Control.Model
|
||||
SerSearchBoxDataSource(baseControl, controlValue + "");
|
||||
}
|
||||
}
|
||||
|
||||
if (baseControl is LabelImageEdit)
|
||||
{
|
||||
LabelImageEdit imageEdit = baseControl as LabelImageEdit;
|
||||
imageEdit.LoadImage(controlValue + "");
|
||||
}
|
||||
else if (baseControl is LabelRemarkEdit && baseControl.Model.FileUploadControl && string.IsNullOrEmpty(PrimaryValue))
|
||||
if (baseControl is LabelRemarkEdit && baseControl.Model.FileUploadControl)
|
||||
{
|
||||
LabelRemarkEdit labelRemarkEdit = baseControl as LabelRemarkEdit;
|
||||
labelRemarkEdit.lasttext = controlValue + "";
|
||||
@@ -3487,9 +3498,15 @@ namespace Lskj.Control.Model
|
||||
if (fileidmodle != null)
|
||||
{
|
||||
BaseUserControl fileidControl = FindControl(fileidmodle.FieldName);
|
||||
labelRemarkEdit.changeAdd = string.IsNullOrEmpty(fileidControl.EditText);
|
||||
int.TryParse(fileidControl.EditText + "", out int oldfileId);
|
||||
labelRemarkEdit.changeAdd = oldfileId <= 0;
|
||||
}
|
||||
}
|
||||
if (baseControl is LabelImageEdit)
|
||||
{
|
||||
LabelImageEdit imageEdit = baseControl as LabelImageEdit;
|
||||
imageEdit.LoadImage(controlValue + "");
|
||||
}
|
||||
else if (baseControl is LabelPictureEdit)
|
||||
{
|
||||
Image image = null;
|
||||
@@ -3770,7 +3787,7 @@ namespace Lskj.Control.Model
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置控件是否只读</para>
|
||||
/// <Is Emptypara>创建人:龚宇超</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-05-22 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
|
||||
Reference in New Issue
Block a user