Example #1
0
        private void lvMakers_ItemActivate(object sender, EventArgs e)
        {
            if (this.lvMakers.SelectedItems.Count > 0){
                int idx = this.lvMakers.SelectedItems[0].Index;
                System.Data.DataRow drw = this.makers.Rows[idx];
                EditMakerForm ef = new EditMakerForm(this.cConnection, null, ref drw);
                if (ef.ShowDialog() == DialogResult.OK)
                {

                }
            }
            return;
        }
Example #2
0
        private void EditMaker()
        {
            if (this.lvMakers.SelectedItems.Count > 0)
            {
                int idx = this.lvMakers.SelectedItems[0].Index;
                //System.Data.DataRow drw = this.makers.Rows[idx];
                System.Data.DataRow drw = (System.Data.DataRow)this.lvMakers.SelectedItems[0].Tag;
                EditMakerForm ef = new EditMakerForm(this.cConnection, this.makers.Rows[idx]["MakerCategory"], ref drw);
                if (ef.ShowDialog() == DialogResult.OK)
                {

                }
            }
            return;
        }
Example #3
0
 private void tsmiCreate_Click(object sender, EventArgs e)
 {
     DataRow new_maker = this.makers.NewRow();
     EditMakerForm emf = new EditMakerForm(this.cConnection, null, ref new_maker);
     if (emf.ShowDialog() == DialogResult.OK)
     {
         this.makers.Rows.Add(new_maker);
         this.AddNewRow(this.lvMakers.Items.Count, new_maker);
     }
     return;
 }
Example #4
0
 private void btnAddMaker_Click(object sender, EventArgs e)
 {
     DataRow new_maker = this.makers.NewRow();
     EditMakerForm emf = new EditMakerForm(this.cConnection, this.cbxCategories.SelectedValue, ref new_maker);
     if (emf.ShowDialog() == DialogResult.OK){
         this.makers.Rows.Add(new_maker);
     }
     return;
 }