Beispiel #1
0
        private void PaymentEdit_Load(object sender, EventArgs e)
        {
            // 契約者情報等セット
            AgreeInfo ai = new AgreeInfo(this.AgreeID);

            txt_ClientAddress.Text = ai.ClientAddress;
            txt_ClientName.Text    = ai.ClientName;
            lbl_AgreeID.Text       = AgreeID.ToString();

            dgv_ParkingList.DataSource = ai.dtParkingInfo;

            dgv_ParkingList.Columns[0].Visible = false;
            dgv_ParkingList.Columns[1].Visible = false;
            dgv_ParkingList.Columns[2].Width   = 100;
            dgv_ParkingList.Columns[3].Width   = 100;


            // 支払履歴セット
            SetPayHistory();

            // 支払方法ドロップダウンセット
            Util.SetPaymentComboBox(cmb_Payment);

            lbl_Monthly.Text = Util.MonthlyPrice(AgreeID).ToString();



            Reset();
            grb_PayRegist.Enabled = false;
        }
Beispiel #2
0
        /// <summary>
        /// 处理同意
        /// </summary>
        /// <param name="userID"></param>
        void ReplyAgree(string userID)
        {
            if (_invitedMapping.TryRemove(userID, out string id))
            {
                var channelID = _storage.GetUserChannelMapping(id);

                if (!string.IsNullOrEmpty(channelID))
                {
                    var at = new AgreeInfo()
                    {
                        ID        = userID,
                        ChannelID = channelID
                    };

                    BaseReply(id, ProtocalType.Agree, Encoding.UTF8.GetBytes(SerializeHelper.Serialize(at)));

                    _storage.SetUserChannelMapping(userID, channelID);

                    _invitedMapping.TryRemove(userID, out string _);

                    _storage.SetChannelUserMapping(channelID, userID, id);
                }
            }
        }