SVN r309
SVN-Revision: r309
This commit is contained in:
@@ -356,10 +356,11 @@ namespace Lskj.Control.Model
|
|||||||
System.Threading.SynchronizationContext.Current.Post(SetProperty, null);
|
System.Threading.SynchronizationContext.Current.Post(SetProperty, null);
|
||||||
void SetProperty(object state)
|
void SetProperty(object state)
|
||||||
{
|
{
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
//放到外面避免线程问题
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
baseControl.Location = model.Location;
|
baseControl.Location = model.Location;
|
||||||
@@ -451,12 +452,12 @@ namespace Lskj.Control.Model
|
|||||||
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
//放到外面避免线程问题
|
||||||
BaseUserControl baseControl = control as BaseUserControl;
|
BaseUserControl baseControl = control as BaseUserControl;
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
|
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
@@ -586,11 +587,12 @@ namespace Lskj.Control.Model
|
|||||||
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
//放到外面避免线程问题
|
||||||
BaseUserControl baseControl = control as BaseUserControl;
|
BaseUserControl baseControl = control as BaseUserControl;
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
baseControl.Location = model.Location;
|
baseControl.Location = model.Location;
|
||||||
@@ -709,12 +711,12 @@ namespace Lskj.Control.Model
|
|||||||
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
System.Windows.Forms.Control control = InitControl(model, isSweepCode);
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
//放到外面避免线程问题
|
||||||
BaseUserControl baseControl = control as BaseUserControl;
|
BaseUserControl baseControl = control as BaseUserControl;
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
|
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
@@ -860,11 +862,13 @@ namespace Lskj.Control.Model
|
|||||||
System.Windows.Forms.Control control = InitControl(model);//创建控件
|
System.Windows.Forms.Control control = InitControl(model);//创建控件
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
//放到外面避免线程问题
|
||||||
BaseUserControl baseControl = control as BaseUserControl;
|
BaseUserControl baseControl = control as BaseUserControl;
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
baseControl.Location = model.Location;
|
baseControl.Location = model.Location;
|
||||||
@@ -1053,12 +1057,12 @@ namespace Lskj.Control.Model
|
|||||||
System.Windows.Forms.Control control = InitControl(model);//创建控件
|
System.Windows.Forms.Control control = InitControl(model);//创建控件
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
//放到外面避免线程问题
|
||||||
BaseUserControl baseControl = control as BaseUserControl;
|
BaseUserControl baseControl = control as BaseUserControl;
|
||||||
baseControl.LabelText = model.LabelText;//放到外面避免线程问题
|
|
||||||
baseControl.Model = model;
|
baseControl.Model = model;
|
||||||
baseControl.FontSize = model.FontSize;
|
baseControl.FontSize = model.FontSize;
|
||||||
baseControl.Name = "txt_" + model.FieldName;
|
baseControl.Name = "txt_" + model.FieldName;
|
||||||
|
baseControl.LabelText = model.LabelText;
|
||||||
|
|
||||||
baseControl.NullText = model.NullText;
|
baseControl.NullText = model.NullText;
|
||||||
//baseControl.EditText = model.DefaultValue;
|
//baseControl.EditText = model.DefaultValue;
|
||||||
@@ -5239,25 +5243,29 @@ namespace Lskj.Control.Model
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool allowBefore = ApiHelper.IsExecEventApi(Interface.Api.OperateEvent.BeforeSearchBtnClick, Model.ModuleCode, 0);
|
if (Model != null)
|
||||||
//查询前调用Api接口
|
|
||||||
if (allowBefore)
|
|
||||||
{
|
{
|
||||||
DataRow dataRow = this.GetAllControlValueRow();
|
bool allowBefore = ApiHelper.IsExecEventApi(Interface.Api.OperateEvent.BeforeSearchBtnClick, Model.ModuleCode, 0);
|
||||||
ApiHelper apiHelper = new ApiHelper(Model.ModuleCode, 0, dataRow);
|
//查询前调用Api接口
|
||||||
apiHelper.OnEvent(Interface.Api.OperateEvent.BeforeSearchBtnClick, Interface.Api.ActionType.None);
|
if (allowBefore)
|
||||||
if (apiHelper.apiHandlerModels.Count > 0)
|
|
||||||
{
|
{
|
||||||
Hashtable hashtable = apiHelper.apiHandlerModels[apiHelper.apiHandlerModels.Count - 1].resultPmsHashtables[0];
|
DataRow dataRow = this.GetAllControlValueRow();
|
||||||
if (hashtable.ContainsKey("result"))
|
ApiHelper apiHelper = new ApiHelper(Model.ModuleCode, 0, dataRow);
|
||||||
|
apiHelper.OnEvent(Interface.Api.OperateEvent.BeforeSearchBtnClick, Interface.Api.ActionType.None);
|
||||||
|
if (apiHelper.apiHandlerModels.Count > 0)
|
||||||
{
|
{
|
||||||
string jsonResult = hashtable["result"] + "";
|
Hashtable hashtable = apiHelper.apiHandlerModels[apiHelper.apiHandlerModels.Count - 1].resultPmsHashtables[0];
|
||||||
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(jsonResult);
|
if (hashtable.ContainsKey("result"))
|
||||||
this._mainGridEx.SetGridViewDataSource(dataTable);
|
{
|
||||||
return;
|
string jsonResult = hashtable["result"] + "";
|
||||||
|
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(jsonResult);
|
||||||
|
this._mainGridEx.SetGridViewDataSource(dataTable);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2332,13 +2332,19 @@ namespace Lskj.Control
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
string idValue = this.PrimaryValue;
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.SysModel.AttachmentAssociated))
|
||||||
|
{
|
||||||
|
idValue = this.ControlObj.GetControlValue(this.SysModel.AttachmentAssociated);
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(this.PrimaryValue))
|
if (string.IsNullOrWhiteSpace(this.PrimaryValue))
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.UnSaveData);
|
MessageUtil.Show(ResourceKeys.UnSaveData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string url = string.Format("pages/PhotoView.html?left=1&username={0}&password={1}&id={2}&isview={3}&dllcoid=", ERPInfo.Instance.UserName, ERPInfo.Instance.Password, this.PrimaryValue, this.btnUpdate.Enabled ? "0" : "1");
|
string url = string.Format("pages/PhotoView.html?left=1&username={0}&password={1}&id={2}&isview={3}&dllcoid=", ERPInfo.Instance.UserName, ERPInfo.Instance.Password, idValue, this.btnUpdate.Enabled ? "0" : "1");
|
||||||
// 固定传入参数(窗口标题、操作员ID、操作员名称、权限、模版编号)
|
// 固定传入参数(窗口标题、操作员ID、操作员名称、权限、模版编号)
|
||||||
string[] defaultArgs = string.Format(ModuleArgs.DefaultArgs, this.Model.FormText, ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, this.Model.Privilege, this.Model.ModuleCode).Split('~');
|
string[] defaultArgs = string.Format(ModuleArgs.DefaultArgs, this.Model.FormText, ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, this.Model.Privilege, this.Model.ModuleCode).Split('~');
|
||||||
string[] menuArgs = SystemInfo.Instance.BsAttachFlag.Equals("1") ? new string[] { "", "", url } : new string[] { string.Format(ModuleArgs.PubPhotoViewArgs, this.PrimaryValue), "0", this.SysModel.MenuDirId + "", "" };
|
string[] menuArgs = SystemInfo.Instance.BsAttachFlag.Equals("1") ? new string[] { "", "", url } : new string[] { string.Format(ModuleArgs.PubPhotoViewArgs, this.PrimaryValue), "0", this.SysModel.MenuDirId + "", "" };
|
||||||
|
|||||||
Reference in New Issue
Block a user