Esempio n. 1
0
 void formList_FormClosed(object sender, FormClosedEventArgs e)
 {
     formList = null;
 }
Esempio n. 2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex < 0 || e.RowIndex < 0) return;
     if (dataGridView1.Columns[e.ColumnIndex].Name.ToLower().Trim().Equals("lbldelete"))
     {
         Bean.BoxBean bean = dataGridView1.Rows[e.RowIndex].DataBoundItem as Bean.BoxBean;
         if (bean == null) return;
         DialogResult result = MessageBox.Show("您确定要删除名称为【" + bean.name + "】的标签吗?", "询问", MessageBoxButtons.OKCancel);
         if (result != System.Windows.Forms.DialogResult.OK) return;
         DeleteBoxLabel(bean);
     }
     else if (dataGridView1.Columns[e.ColumnIndex].Name.ToLower().Trim().Equals("lblseearchive"))
     { 
         Bean.BoxBean bean = dataGridView1.Rows[e.RowIndex].DataBoundItem as Bean.BoxBean;
         if (bean == null) return;
         FormList form = new FormList();
         form.Text = "【"+bean.name+"】盒标签下的档案信息";
         form.SetBoxRfid(bean.rfid);
         form.WindowState = FormWindowState.Normal;
         form.StartPosition = FormStartPosition.CenterParent;
         form.ShowDialog();
     }
     else if (dataGridView1.Columns[e.ColumnIndex].Name.ToString().ToLower().Equals("lblsetposition"))
     {
         Bean.BoxBean bean = dataGridView1.Rows[e.RowIndex].DataBoundItem as Bean.BoxBean;
         if (bean == null) return;
         SetPosition(bean);
     }
 }
Esempio n. 3
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (formList == null)
            {
                formList = new FormList();
                formList.FormClosed += formList_FormClosed;
                formList.MdiParent = this;
            }

            formList.Show();
            formList.BringToFront();
        }