Exemplo n.º 1
0
 /// <summary>
 /// 确认预约,上传信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button_ok_Click(object sender, EventArgs e)
 {
     if (textBox_business.Text.Equals("") && textBox_people.Text.Equals("") || textBox_customer.Text.Equals(""))
     {
         MessageBox.Show("提示:会议室的安排的信息不能为空,请输入正确的信息!", "Tips");
         return;
     }
     string[] roomInfo = new string[9];
     roomInfo[0] = roomIndex + "_" + comboBox_name.Text;
     roomInfo[1] = comboBox_name.Text;
     roomInfo[2] = textBox_people.Text;
     roomInfo[3] = textBox_customer.Text;
     roomInfo[4] = textBox_business.Text;
     roomInfo[5] = dateTimePicker_time.Value.ToString("yyyy-MM-dd HH:mm:00");
     roomInfo[6] = dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00");
     roomInfo[7] = richTextBox_tips.Text;
     roomInfo[8] = roomIndex;
     try
     {
         AccessFunction.InsertClientProtocol(roomInfo);
         f.OtherSend(string.Format("reservate,{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", selfUserNember, peerUserIPEndPoint, roomIndex, comboBox_name.Text, textBox_people.Text, textBox_customer.Text, textBox_business.Text, dateTimePicker_time.Value.ToString("yyyy-MM-dd HH:mm:00"), dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00"), richTextBox_tips.Text));
     }
     catch
     { }
     this.Close();
 }
Exemplo n.º 2
0
        /// <summary>
        /// 确认操作的设置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_ok_Click(object sender, EventArgs e)
        {
            if (textBox_business.Text.Equals("") && (textBox_people.Text.Equals("") || textBox_customer.Text.Equals("")))
            {
                MessageBox.Show("提示:会议室的安排的信息不能为空,请输入正确的信息!", "Tips");
                return;
            }
            Room_Info r = new Room_Info(textBox_name.Text, textBox_people.Text, textBox_customer.Text, textBox_business.Text, dateTimePicker_time.Value.ToString(), dateTimePicker1.Value.ToString(), richTextBox_tips.Text, false);

            if (Scheduled)//预约确认
            {
                string[] roomInfo = new string[8];
                roomInfo[0] = roomIndex + "_" + textBox_name.Text;
                roomInfo[1] = textBox_name.Text;
                roomInfo[2] = textBox_people.Text;
                roomInfo[3] = textBox_customer.Text;
                roomInfo[4] = textBox_business.Text;
                roomInfo[5] = dateTimePicker_time.Value.ToString("yyyy-MM-dd HH:mm:00");
                roomInfo[6] = dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00");
                roomInfo[7] = richTextBox_tips.Text;
                if (ModifyFlag)//预约信息修改确认操作
                {
                    AccessFunction.DeleteClientProtocol(roomIndex + "_" + textBox_name.Text);
                    ModifyFlag = false;
                }
                AccessFunction.InsertClientProtocol(roomInfo);
                f.OtherSend(string.Format("reservate,{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", selfUserNember, peerUserIPEndPoint, roomIndex, textBox_name.Text, textBox_people.Text, textBox_customer.Text, textBox_business.Text, dateTimePicker_time.Value.ToString("yyyy-MM-dd HH:mm:00"), dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00"), richTextBox_tips.Text));
            }
            else
            {
                if (!DeleteFlag)      //预约信息删除确认操作
                {
                    r.Setstate(true); //设置需要使用状态
                    f.SetRoom(textBox_name.Text, r);

                    f.OtherSend(string.Format("addin,{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", selfUserNember, peerUserIPEndPoint, roomIndex, textBox_name.Text, textBox_people.Text, textBox_customer.Text, textBox_business.Text, dateTimePicker_time.Value.ToString("yyyy-MM-dd HH:mm:00"), dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:00"), richTextBox_tips.Text));
                }
            }
            this.Close();
        }