123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using LYFZ.Model;
- namespace LYFZ.Software.MainBusiness.NewCameraControlBook
- {
- public class frmNotifyCustomer : LYFZ.Software.NewCameraControlBook.frmNotifyCustomer
- {
- public frmNotifyCustomer()
- {
- this.Load += FrmNotifyCustomer_Load;
- this.Shown += FrmNotifyCustomer_Shown;
- this.buttonEx2.Click += new System.EventHandler(this.buttonEx2_Click);
- this.buttonEx1.Click += new System.EventHandler(this.buttonEx1_Click);
- }
- private void FrmNotifyCustomer_Shown(object sender, EventArgs e)
- {
- this.txtInfo.Text = this.CustomerText.Trim();
- this.cbxTypeList.SelectedItem = this.NotifyType.ToString();
- }
- LYFZ.Model.NotifyCustomerType _NotifyType = Model.NotifyCustomerType.未通知;
- string _CustomerText = "";
- public NotifyCustomerType NotifyType { get => _NotifyType; set => _NotifyType = value; }
- public string CustomerText { get => _CustomerText; set => _CustomerText = value; }
- private void FrmNotifyCustomer_Load(object sender, EventArgs e)
- {
- this.cbxTypeList.Items.AddRange(Enum.GetNames(typeof(LYFZ.Model.NotifyCustomerType)));
- }
- private void buttonEx2_Click(object sender, EventArgs e)
- {
- this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- }
- private void buttonEx1_Click(object sender, EventArgs e)
- {
- this.CustomerText = this.txtInfo.Text.Trim();
- this.NotifyType =(LYFZ.Model.NotifyCustomerType)Enum.Parse(typeof(LYFZ.Model.NotifyCustomerType), this.cbxTypeList.SelectedItem.ToString());
- this.DialogResult = System.Windows.Forms.DialogResult.OK;
- }
- }
- }
|