예제 #1
0
        private void FrmSelectCustoInfo_Load(object sender, EventArgs e)
        {
            txtCustoNo.Text = ucRoomList.rm_CustoNo;
            Custo c = CustoService.SelectCustoByCustoNo(txtCustoNo.Text);

            txtAddress.Text               = c.CustoAdress;
            txtCustoName.Text             = c.CustoName;
            txtPassportNum.Text           = c.CustoID;
            txtTel.Text                   = c.CustoTel;
            cboCustoSex.Text              = c.CustoSex;
            cboCustoType.SelectedIndex    = c.CustoType;
            cboPassportType.SelectedIndex = c.PassportType;
            dtpBirth.Value                = c.CustoBirth;
        }
 /// <summary>
 /// 根据客户编号查询客户信息
 /// </summary>
 /// <param name="cno"></param>
 /// <returns></returns>
 public static Custo SelectCustoByCustoNo(string cno)
 {
     return(CustoService.SelectCustoByCustoNo(cno));
 }
예제 #3
0
        private void FrmCheckOutForm_Load(object sender, EventArgs e)
        {
            txtCustoNo.Text = ucRoomList.rm_CustoNo;
            CustoNo.Text    = ucRoomList.rm_CustoNo;
            txtRoomNo.Text  = ucRoomList.rm_RoomNo;
            CmpSetDgv();
            try
            {
                dtpCheckTime.Value = DateTime.Now;
            }
            catch
            {
                dtpCheckTime.Value = Convert.ToDateTime(ucRoomList.rm_CheckTime);
            }

            lblDay.Text = Convert.ToString(Convert.ToInt32(RoomService.DayByRoomNo(txtRoomNo.Text).ToString()));

            #region 加载客户信息
            Custo cto = CustoService.SelectCustoByCustoNo(CustoNo.Text.ToString());
            CustoName.Text                = cto.CustoName;
            txtCustoName.Text             = cto.CustoName;
            txtTel.Text                   = cto.CustoTel;
            cboCustoSex.Text              = cto.CustoSex;
            cboCustoType.SelectedIndex    = cto.CustoType;
            cboPassportType.SelectedIndex = cto.PassportType;
            dtpBirth.Value                = cto.CustoBirth;
            txtPassportNum.Text           = cto.CustoID;
            #endregion

            #region 加载消费信息
            string RoomNo = txtRoomNo.Text;
            dgvSpendList.DataSource          = SpendService.SelectSpendInfoRoomNo(RoomNo);
            dgvSpendList.AutoGenerateColumns = false;
            lblGetReceipts.Text = SpendService.SelectMoneyByRoomNoAndTime(RoomNo).ToString();
            #endregion

            if (cboCustoType.Text == "钻石会员")
            {
                double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text));
                lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.60));
                lblVIP.Text      = "六折";
            }
            else if (cboCustoType.Text == "白金会员")
            {
                double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text));
                lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.80));
                lblVIP.Text      = "八折";
            }
            else if (cboCustoType.Text == "黄金会员")
            {
                double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text));
                lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.90));
                lblVIP.Text      = "九折";
            }
            else if (cboCustoType.Text == "普通会员")
            {
                double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text));
                lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.95));
                lblVIP.Text      = "九五折";
            }
            else if (cboCustoType.Text == "普通用户")
            {
                double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text));
                lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m));
                lblVIP.Text      = "不  打  折";
            }
        }