Ejemplo n.º 1
0
        private void AddItem_Click(object sender, EventArgs e)
        {
            NewItem A = new NewItem();

            A.StartPosition = FormStartPosition.CenterScreen;
            A.ShowDialog();
        }
        public override void Add()
        {
            var newItem = new NewItem("新建工程");

            newItem.ShowDialog();
            if (newItem.DialogResult == false)
            {
                return;
            }
            Directory.CreateDirectory($"{GetPath()}\\{newItem.Result}");
            Children.Add(new ProjectViewModel()
            {
                Parent = this, Name = newItem.Result
            });
        }
Ejemplo n.º 3
0
 private void btnNewItems_Click_1(object sender, EventArgs e)
 {
     NewItem itempage = new NewItem();
     itempage.ShowDialog();
     PrepareGridForStock();
 }
Ejemplo n.º 4
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string type = dataGridView1.Columns[0].Name;

            if(type == "ItemId")
            {
                NewItem itemfrm = new NewItem();
                itemfrm.Text = "Edit Item";

                itemfrm.ShowDialog();
                PrepareGridForStock();
            }
            if(type == "UserId")
            {
                EditUser editfrm = new EditUser();
                editfrm.User = UserMapper.GetInstance().GetUserById(dataGridView1.CurrentRow.Cells[0].Value.ToString());
                editfrm.ShowDialog();
                PrepareGridForUsers();
            }
        }