frmstroryset_roomadd.cs

来自「酒店管理软件,c#版本可以选择不同的模式」· CS 代码 · 共 97 行

CS
97
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Hotel.Command;

namespace Hotel.SystemSetting
{
    public partial class FrmStrorySet_RoomAdd : Form
    {
        private string _No;

        public string No
        {
            get { return _No; }
            set { _No = value; }
        }
        private string _Class;

        public string Class
        {
            get { return _Class; }
            set { _Class = value; }
        }
        private string _Style;

        public string Style
        {
            get { return _Style; }
            set { _Style = value; }
        }
        private Int32 _Population;

        public Int32 Population
        {
            get { return _Population; }
            set { _Population = value; }
        }
        private Boolean _Used;

        public Boolean Used
        {
            get { return _Used; }
            set { _Used = value; }
        }
    
        public FrmStrorySet_RoomAdd()
        {
            InitializeComponent();
        }

        private void FrmStrorySet_RoomAdd_Load(object sender, EventArgs e)
        {
            CordInit();
        }

        private void CordInit()
        {
            CordData cd = new CordData();

            foreach (Cord var in cd.StoreyCord)
            {
                this.cboRoomClass.Items.Add(var.Dm + "." + var.Name);
            }
            this.cboRoomClass.Items.IndexOf("N");
            foreach (Cord var in cd.RoomCord)
            {
                this.cboRoomStyle.Items.Add(var.Dm + "." + var.Name);
            }
            this.cboRoomStyle.Items.IndexOf("N");
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            this._No = txtRoomNo.Text;
            this._Class = cboRoomClass.Text;
            this._Style = cboRoomStyle.Text;
            this._Population = System.Convert.ToInt32(txtRoomPopulation.Text) ;
            this._Used = chkRoomUsed.Checked;
            Close();

        }

        private void btnCanle_Click(object sender, EventArgs e)
        {
            this._No = "";
            this._Class = "";
            this._Style = "";
            this._Population = 0;
            this._Used = false;
            Close();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?