Exemplo n.º 1
0
 public override void Modify(object sender, EventArgs e)
 {
     if (dgvFactory.SelectedRows.Count > 0 || dgvLine.SelectedRows.Count > 0)
     {
         if (dgvLine.SelectedRows.Count < 1)
         {
             FactoryInsUp popup = new FactoryInsUp(FactoryInsUp.EditMode.Update, factoryItem);
             if (popup.ShowDialog() == DialogResult.OK)
             {
                 frm.NoticeMessage     = Resources.ModDone;
                 dgvFactory.DataSource = null;
                 LoadGridView();
             }
         }
         else if (dgvFactory.SelectedRows.Count < 1)
         {
             LineInsUp popup = new LineInsUp(LineInsUp.EditMode.Update, lineItem);
             if (popup.ShowDialog() == DialogResult.OK)
             {
                 frm.NoticeMessage     = Resources.ModDone;
                 dgvFactory.DataSource = null;
                 LoadGridView();
             }
         }
     }
     else
     {
         frm.NoticeMessage = Resources.ModEmpty;
     }
 }
Exemplo n.º 2
0
 private void ItemSelect(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Text == "공장")
     {
         FactoryInsUp popup = new FactoryInsUp(FactoryInsUp.EditMode.Insert, null);
         if (popup.ShowDialog() == DialogResult.OK)
         {
             frm.NoticeMessage     = Resources.AddDone;
             dgvFactory.DataSource = null;
             LoadGridView();
         }
     }
     else
     {
         LineInsUp popup = new LineInsUp(LineInsUp.EditMode.Insert, null);
         if (popup.ShowDialog() == DialogResult.OK)
         {
             frm.NoticeMessage     = Resources.AddDone;
             dgvFactory.DataSource = null;
             LoadGridView();
         }
     }
 }