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 LYFZ.Software.MainBusiness.Dresses { public partial class DressOpenOrderFirstFormMain : LYFZ.Software.UI.Dresses.DressOpenOrderFirstFormMain { public DressOpenOrderFirstFormMain() { this.Load += DressOpenOrderFormMain_Load; this.Shown += DressOpenOrderFormMain_Shown; this.btnPreselect.Click += btnPreselect_Click; this.btnRent.Click += btnRent_Click; this.btnSold.Click += btnSold_Click; this.btnSendWash.Click += btnSendWash_Click; this.FormClosed += DressOpenOrderFirstFormMain_FormClosed; } /// /// 是否要跳转界面 /// bool IsGoForm = false; /// /// 点击要跳转的类型 /// LYFZ.EnumPublic.EnumDressOrderType btnClickType; /// /// 窗体加载 /// /// /// void DressOpenOrderFormMain_Load(object sender, EventArgs e) { this.btnPreselect.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.DressManagement, CustomAttributes.OperatingAuthority.Dress_Preselection); this.btnRent.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.DressManagement, CustomAttributes.OperatingAuthority.Dress_Rental); this.btnSold.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.DressManagement, CustomAttributes.OperatingAuthority.Dress_Rental); this.btnSendWash.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.DressManagement, CustomAttributes.OperatingAuthority.Dress_Valet); } /// /// 窗体加载 /// /// /// void DressOpenOrderFormMain_Shown(object sender, EventArgs e) { bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion(VersionControl.VersionFunctionEnum.礼服管理); if (!b) { this.Close(); return; } this.TopMost = false; } /// /// 预选 /// /// /// void btnPreselect_Click(object sender, EventArgs e) { this.btnClickType = EnumPublic.EnumDressOrderType.预选; this.IsGoForm = true; this.Close(); } /// /// 出租 /// /// /// void btnRent_Click(object sender, EventArgs e) { this.btnClickType = EnumPublic.EnumDressOrderType.出租; this.IsGoForm = true; this.Close(); } /// /// 出售 /// /// /// void btnSold_Click(object sender, EventArgs e) { this.btnClickType = EnumPublic.EnumDressOrderType.出售; this.IsGoForm = true; this.Close(); } /// /// 送洗 /// /// /// void btnSendWash_Click(object sender, EventArgs e) { this.btnClickType = EnumPublic.EnumDressOrderType.送洗; this.IsGoForm = true; this.Close(); } /// /// 窗体关闭后发生事件 /// /// /// void DressOpenOrderFirstFormMain_FormClosed(object sender, FormClosedEventArgs e) { if (this.IsGoForm) { if (this.btnClickType == EnumPublic.EnumDressOrderType.预选) { LYFZ.Software.MainBusiness.Dresses.SetSmallForm.DressOpenOrdePreselectedSmallForm frm = new SetSmallForm.DressOpenOrdePreselectedSmallForm(); frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual; frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y); frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height); frm.TopMost = true; frm.Show(); } else if (this.btnClickType == EnumPublic.EnumDressOrderType.送洗) { LYFZ.Software.MainBusiness.Dresses.SetSmallForm.DressOpenOrderSendWashSmallForm frm = new SetSmallForm.DressOpenOrderSendWashSmallForm(); frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual; frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y); frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height); frm.TopMost = true; frm.Show(); } else if (this.btnClickType == EnumPublic.EnumDressOrderType.出租 || this.btnClickType == EnumPublic.EnumDressOrderType.出售) { LYFZ.Software.MainBusiness.Dresses.SetSmallForm.DressOpenOrderRentSaleSmallForm frm = new SetSmallForm.DressOpenOrderRentSaleSmallForm(); frm.LoadType = this.btnClickType.ToString().Trim(); frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual; frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y); frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height); frm.TopMost = true; frm.Show(); } } } } }