123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- 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;
- }
- /// <summary>
- /// 是否要跳转界面
- /// </summary>
- bool IsGoForm = false;
- /// <summary>
- /// 点击要跳转的类型
- /// </summary>
- LYFZ.EnumPublic.EnumDressOrderType btnClickType;
- /// <summary>
- /// 窗体加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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);
- }
- /// <summary>
- /// 窗体加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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;
-
- }
- /// <summary>
- /// 预选
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnPreselect_Click(object sender, EventArgs e)
- {
- this.btnClickType = EnumPublic.EnumDressOrderType.预选;
- this.IsGoForm = true;
- this.Close();
- }
- /// <summary>
- /// 出租
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnRent_Click(object sender, EventArgs e)
- {
- this.btnClickType = EnumPublic.EnumDressOrderType.出租;
- this.IsGoForm = true;
- this.Close();
- }
- /// <summary>
- /// 出售
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSold_Click(object sender, EventArgs e)
- {
- this.btnClickType = EnumPublic.EnumDressOrderType.出售;
- this.IsGoForm = true;
- this.Close();
- }
- /// <summary>
- /// 送洗
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSendWash_Click(object sender, EventArgs e)
- {
- this.btnClickType = EnumPublic.EnumDressOrderType.送洗;
- this.IsGoForm = true;
- this.Close();
- }
- /// <summary>
- /// 窗体关闭后发生事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
- }
- }
- }
- }
- }
|