基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using Lskj.Control;
|
||||
using Lskj.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.PubMrpAnalyze
|
||||
{
|
||||
public partial class FrmMain : BaseForm
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// mrp动态链接库
|
||||
/// </summary>
|
||||
public DynamicMrpAnalyzeModel AnalyzeModel;
|
||||
private MrpAnalyzeMain analyzeMain;
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += new EventHandler(OnFrmMain_Load);
|
||||
this.FormClosed += OnFormClosed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体关闭时触发更新sql
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnFormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.analyzeMain.MoudleMainObj.CloseBeforeSql))
|
||||
{
|
||||
string CloseBeforeSql = this.analyzeMain.MoudleMainObj.CloseBeforeSql;
|
||||
CloseBeforeSql = Lskj.Util.ReplaceHelper.ReplaceUserInfo(CloseBeforeSql);
|
||||
Lskj.Core.SqlHelper.ExecuteNonQuery(CloseBeforeSql);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体加载时
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnFrmMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
MrpAnalyzeMain mrpAnalyzeMain = new MrpAnalyzeMain();
|
||||
analyzeMain = mrpAnalyzeMain;
|
||||
mrpAnalyzeMain.OnLoad(AnalyzeModel);
|
||||
this.Controls.Add(mrpAnalyzeMain);
|
||||
mrpAnalyzeMain.Dock = DockStyle.Fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user