コード例 #1
0
        private void btnKP_Click(object sender, EventArgs e)
        {
            try
            {
                int Num = 0;
                int ID  = 0;
                foreach (Control c in groupControlMainten.Controls)
                {
                    if (c is DevExpress.XtraEditors.CheckEdit && SysConvert.ToInt32(((DevExpress.XtraEditors.CheckEdit)c).Name) > 100)
                    {
                        if (((DevExpress.XtraEditors.CheckEdit)c).Checked)
                        {
                            Num++;
                            ID = SysConvert.ToInt32(((DevExpress.XtraEditors.CheckEdit)c).Name);
                        }
                    }
                }

                if (Num > 1 || Num == 0)
                {
                    this.ShowMessage("请选择一条需要开匹的信息!");
                    return;
                }
                frmKPEdit frm = new frmKPEdit();
                frm.ID = ID;
                frm.ShowDialog();
                groupControlMainten.Controls.Clear();
                CreateCheckBox();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
コード例 #2
0
        /// <summary>
        /// 开匹事件,供委托调用
        /// </summary>
        /// <param name="p_ISN"></param>
        void EventKPClick(string p_ISN)
        {
            //this.ShowMessage(p_ISN+" TOP ");

            try
            {
                if (p_ISN == string.Empty)
                {
                    this.ShowMessage("请选择一条需要开匹的信息!");
                    return;
                }
                frmKPEdit frm = new frmKPEdit();
                frm.ISN = p_ISN;
                frm.ShowDialog();
                if (frm.KPFinishFlag)
                {
                    ucFabLoad1.UCActKP(GetDataSource());//执行开匹后绘画
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }