/// <summary>
        /// 添加新物品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            var itemCreateForm = new EntityCreateForm(EntityType);

            if (itemCreateForm.ShowDialog() == DialogResult.OK)
            {
                Database.Add(itemCreateForm.Entity);
                Database.Save();
                selectionBind();
            }
        }
示例#2
0
 private void entityCreateToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.SqlConn != null && this.SqlConn.State == ConnectionState.Open)
     {
         EntityCreateForm popup = new EntityCreateForm(this);
         popup.MdiParent   = this;
         popup.ShowIcon    = false;
         popup.WindowState = FormWindowState.Maximized;
         popup.Show();
     }
     else
     {
         MessageBox.Show("Database가 연결된 상태가 아닙니다.  Setup을 먼저 진행해 주세요.");
     }
 }