Ejemplo n.º 1
0
 private void btn_prod_modify_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog ofd = new OpenFileDialog())
     {
         ofd.Filter = "XML Files|*.xml";
         if (ofd.ShowDialog() == DialogResult.OK)
         {
             Product product  = Product.Load(ofd.FileName);
             Form    editForm = new frm_edit_xml(product, ofd.FileName);
             editForm.ShowDialog();
         }
     }
 }
Ejemplo n.º 2
0
 private void btn_prod_create_Click(object sender, EventArgs e)
 {
     using (SaveFileDialog sfd = new SaveFileDialog())
     {
         sfd.Filter = "XML Files|*.xml";
         if (sfd.ShowDialog() == DialogResult.OK)
         {
             Product product = new Product("Untitled Product");
             Form    frm     = new frm_edit_xml(product, sfd.FileName);
             frm.ShowDialog();
         }
     }
 }