Example #1
0
 private void simpleButton4_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow != null)
     {
         string guid   = dataGridView1.SelectedRows[0].Cells["Column2"].Value.ToString();
         PSPDIR pspDIR = new PSPDIR();
         pspDIR.FileGUID = guid;
         pspDIR          = Services.BaseService.GetOneByKey <PSPDIR>(pspDIR);
         SVGFILE svgFile = new SVGFILE();
         svgFile.SUID = guid;
         svgFile      = Services.BaseService.GetOneByKey <SVGFILE>(svgFile);
         if (pspDIR != null && svgFile != null)
         {
             frmSvgFile frmFile = new frmSvgFile(pspDIR);
             if (frmFile.ShowDialog() == DialogResult.OK)
             {
                 pspDIR.FileName  = frmFile.SvgFileName;
                 svgFile.FILENAME = frmFile.SvgFileName;
                 Services.BaseService.Update <PSPDIR>(pspDIR);
                 Services.BaseService.Update <SVGFILE>(svgFile);
                 InitData();
             }
         }
     }
 }
Example #2
0
 private void simpleButton4_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow!=null)
     {
         string guid = dataGridView1.SelectedRows[0].Cells["Column2"].Value.ToString();
         PSPDIR pspDIR = new PSPDIR();
         pspDIR.FileGUID = guid;
         pspDIR = Services.BaseService.GetOneByKey<PSPDIR>(pspDIR);
         SVGFILE svgFile = new SVGFILE();
         svgFile.SUID = guid;
         svgFile = Services.BaseService.GetOneByKey<SVGFILE>(svgFile);
         if (pspDIR!=null&&svgFile!=null)
         {
             frmSvgFile frmFile = new frmSvgFile(pspDIR);
             if (frmFile.ShowDialog() == DialogResult.OK)
             {
                 pspDIR.FileName = frmFile.SvgFileName;
                 svgFile.FILENAME = frmFile.SvgFileName;
                 Services.BaseService.Update<PSPDIR>(pspDIR);
                 Services.BaseService.Update<SVGFILE>(svgFile);
                 InitData();
             }
         }
     }
 }