private void lvwUserList_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                if (this.lvwUserList.SelectedRows.Count <= 0)
                {
                    MessageBox.Show("请选择要修改的项!");
                    return;
                }
                if (this.lvwUserList.SelectedRows[0].Cells["PositionVoice_ID"].Value.ToString() == "")
                {
                    MessageBox.Show("请选择要修改的项!");
                    return;
                }
                else
                {
                    isUpdate = true;
                    string        sql = "select * from PositionVoice where PositionVoice_ID='" + this.lvwUserList.SelectedRows[0].Cells["PositionVoice_ID"].Value.ToString() + "'";
                    PositionVoice pv  = PositionVoiceDAL.GetVoice(sql);
                    txtPositionVoice_Count.Text   = pv.PositionVoice_Count.ToString();
                    txtPositionVoice_Remark.Text  = pv.PositionVoice_Remark.ToString();
                    cmbtxtPositionVoice_Type.Text = pv.PositionVoice_PassageState;
                    chkPositionVoice_Position_Id.SelectedValue = int.Parse(pv.PositionVoice_Position_ID.ToString());
                    combokPositionVoice_State.Text             = pv.PositionVoice_State.ToString();
                    string[] content = pv.PositionVoice_Content.Split(',');

                    chkCarNumber.Checked    = false;
                    chkSerialnumber.Checked = false;
                    chkCarType.Checked      = false;
                    foreach (var item in content)
                    {
                        if (item == chkCarNumber.Text)
                        {
                            chkCarNumber.Checked = true;
                        }

                        if (item == chkSerialnumber.Text)
                        {
                            chkSerialnumber.Checked = true;
                        }

                        if (item == chkCarType.Text)
                        {
                            chkCarType.Checked = true;
                        }
                    }
                }
                btnAdd.Enabled    = false;
                btnUpdate.Enabled = true;
            }
            catch
            {
                CommonalityEntity.WriteTextLog("VoiceSetForm lvwUserList_DoubleClick()" + "");//记录异常日志
            }
        }
示例#2
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void QueueForm_Load(object sender, EventArgs e)
        {
            combox_LEDShowNumber.SelectedIndex = 1;
            cmbtongxing.SelectedIndex          = 1;
            lblDoor.Text = SystemClass.PositionName;//当前门岗
            tscbxPageSize.SelectedIndex = 2;
            GetDriveway();
            comboxDriveway_SelectionChangeCommitted(sender, e);
            userContext();
            bindcartpe();
            where += " and 通行状态='排队中'";
            GetGriddataviewLoad("");
            string voSql = "Select * from PositionVoice where PositionVoice_State='启动' and PositionVoice_Position_ID=" + SystemClass.PositionID + "";

            pv = PositionVoiceDAL.GetVoice(voSql);
        }