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.Control.Model; using Lskj.Business.Impl; using Lskj.Data; using Lskj.Util; using Lskj.Model; namespace Lskj.PubBillBrp { public partial class FrmMain : BaseForm { public DynamicBillBrpModel SysModel; public FrmMain() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { try { WaitForm.ShowForm(); this.SysModel.Privilege = this.SysModel.Privilege.Equals("3") ? "1" : 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); billModule1.MainBottomInputObj.Visible = false; billModule1.MainBottomTempleteObj.Visible = true; } } catch (Exception ex) { LogHelper.Instance.WriteError(ex); //MessageUtil.Show(ex.StackTrace); string Message = ErrorMessage.PromptErrorMessage(ex); MessageUtil.Show(Message,ex.Message); } finally { Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this); WaitForm.HideForm(); } } } }