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; using Lskj.Control; using Lskj.Model; using Lskj.Control.Model; using Lskj.Business.Impl; using Lskj.Data; using Lskj.Util; namespace Lskj.PubBillAccount { public partial class FrmMain : BaseForm { /// /// 入口参数 /// public DynamicBillModel SysModel; public FrmMain() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { try { WaitForm.ShowForm(); this.SysModel.Privilege = SysModel.ModuleId > 0 ? BaseImpl.GetUserPurviewsByMenuId(SysModel.ModuleId + "") + "" : BaseImpl.GetUserPurviewsByMenuCode(SysModel.ModuleCode) + ""; if (!this.SysModel.HasPrivilege()) { MessageUtil.Show(ResourceKeys.UnPurview); this.Close(); } else { billModule1.OnLoad(SysModel); // 右键菜单调用方式,则模块名称按照系统设置设定 if (!string.IsNullOrEmpty(this.SysModel.BillMasterSql) || !string.IsNullOrEmpty(this.SysModel.BillOrderNo)) { this.Text = this.billModule1.BillModel.TypeName; } } } catch (Exception ex) { LogHelper.Instance.WriteError(ex); //MessageUtil.Show(ex); string Message = ErrorMessage.PromptErrorMessage(ex); MessageUtil.Show(Message,ex.Message); } finally { Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this); WaitForm.HideForm(); } } } }