Exemple #1
0
        private void btnCreateNew_Click(object sender, EventArgs e)
        {
            InsertTM frmInsTm = new InsertTM();

            frmInsTm.ShowDialog();

            if (frmInsTm.success)
            {
                //refresh
                tempRecList             = SelectTempRecs_Trademark();  //List
                tempRecList_Full        = SelectTempRecs(tempRecList); //BindingList
                gridControl1.DataSource = tempRecList_Full;            //DataSource
            }
        }
Exemple #2
0
        private void tsmiViewTM_Click(object sender, EventArgs e)
        {
            if (gridView1.SelectedRowsCount > 0 && gridView1.GetSelectedRows()[0] >= 0)
            {
                int       Id         = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString());
                Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First();

                InsertTM frmViewTm = new InsertTM(thisTmpRec);
                frmViewTm.MakeAllControlsReadOnly(frmViewTm);
                frmViewTm.GetFromGridOnlyChecked();

                frmViewTm.btnSave.Enabled = false;
                frmViewTm.ShowDialog();
            }
        }
Exemple #3
0
        private void tsmiViewTM_Click(object sender, EventArgs e)
        {
            if (dgvTempRecs.SelectedRows.Count > 0)
            {
                int       Id         = Convert.ToInt32(dgvTempRecs.SelectedRows[0].Cells["tmp_Id"].Value.ToString());
                Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First();

                InsertTM frmViewTm = new InsertTM(thisTmpRec);
                frmViewTm.MakeAllControlsReadOnly(frmViewTm);
                frmViewTm.GetFromGridOnlyChecked();

                frmViewTm.btnSave.Enabled = false;
                frmViewTm.ShowDialog();
            }
        }
Exemple #4
0
        private void btnCreateNew_Click(object sender, EventArgs e)
        {
            InsertTM frmInsTm = new InsertTM();

            frmInsTm.ShowDialog();

            if (frmInsTm.success)
            {
                //refresh
                //tempRecList[tempRecList.FindIndex(w => w.Id == Id)] = frmUpdTm.NewRecord;

                //FillDataGridView(dgvTempRecs, frmUpdTm.NewRecord, dgvIndex);
                tempRecList = SelectTempRecs();
                FillDataGridView(dgvTempRecs, tempRecList);
            }
        }
Exemple #5
0
        /*
         * void EncryptAppConfig(string sectionName) //"connectionStrings"
         * {
         *  // Takes the executable file name without the .config extension.
         *  try
         *  {
         *      // Open the configuration file and retrieve the connectionStrings section.
         *      Configuration config = ConfigurationManager.OpenExeConfiguration(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
         *
         *      //ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
         *      ConnectionStringsSection section = config.GetSection(sectionName) as ConnectionStringsSection;
         *
         *      if (section.SectionInformation.IsProtected)
         *      {
         *          MessageBox.Show("Config File Is Already Protected!");
         *          //DialogResult dlg = MessageBox.Show("Config File Is Already Protected!\r\nDo you want to Dencrypt it?", "", MessageBoxButtons.YesNo);
         *          //if (dlg == DialogResult.Yes)
         *          //{
         *          //    //Remove encryption.
         *          //    section.SectionInformation.UnprotectSection();
         *          //}
         *      }
         *      else
         *      {
         *          DialogResult dlg = MessageBox.Show("Config File Is Not Protected!\r\nDo you want to Encrypt it?", "", MessageBoxButtons.YesNo);
         *          if (dlg == DialogResult.Yes)
         *          {
         *              // Encrypt the section.
         *              section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
         *          }
         *      }
         *
         *      MessageBox.Show("Protected: " + section.SectionInformation.IsProtected);
         *
         *      // Save the current configuration.
         *      config.Save();
         *  }
         *  catch (Exception ex)
         *  {
         *      MessageBox.Show(ex.Message);
         *  }
         * }
         */

        /*
         * void EncryptAppConfig_ConnStrings() //"connectionStrings"
         * {
         *  string sectionName = "connectionStrings";
         *  // Takes the executable file name without the .config extension.
         *  try
         *  {
         *      // Open the configuration file and retrieve the connectionStrings section.
         *      Configuration config = ConfigurationManager.OpenExeConfiguration(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
         *
         *      ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
         *      //ConnectionStringsSection section = config.GetSection(sectionName) as ConnectionStringsSection;
         *
         *      //AppSettingsSection section = config.GetSection("appSettings") as AppSettingsSection;
         *
         *      if (section.SectionInformation.IsProtected)
         *      {
         *          MessageBox.Show(sectionName + ": Config File Is Already Protected!");
         *          //DialogResult dlg = MessageBox.Show("Config File Is Already Protected!\r\nDo you want to Dencrypt it?", "", MessageBoxButtons.YesNo);
         *          //if (dlg == DialogResult.Yes)
         *          //{
         *          //    //Remove encryption.
         *          //    section.SectionInformation.UnprotectSection();
         *          //}
         *      }
         *      else
         *      {
         *          DialogResult dlg = MessageBox.Show(sectionName + ": Config File Is Not Protected!\r\nDo you want to Encrypt it?", "", MessageBoxButtons.YesNo);
         *          if (dlg == DialogResult.Yes)
         *          {
         *              // Encrypt the section.
         *              section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
         *          }
         *      }
         *
         *      MessageBox.Show(sectionName + ": Protected -> " + section.SectionInformation.IsProtected);
         *
         *      // Save the current configuration.
         *      config.Save();
         *  }
         *  catch (Exception ex)
         *  {
         *      MessageBox.Show(ex.Message);
         *  }
         * }
         */

        private void tsmiTM_ins_Click(object sender, EventArgs e)
        {
            //QuickInsert frmQuickIns = new QuickInsert();
            //frmQuickIns.ShowDialog();

            //while (frmQuickIns.GoToNext)
            //{
            //    frmQuickIns.GoToNext = false;

            //    frmQuickIns = new QuickInsert();
            //    frmQuickIns.ShowDialog();
            //}

            InsertTM frmInsTm = new InsertTM();

            frmInsTm.ShowDialog();
        }
        private void tsmiViewTM_Click(object sender, EventArgs e)
        {
            //Select
            if (dgvAlerts.SelectedRows.Count > 0)
            {
                //int dgvIndex = dgvAlerts.SelectedRows[0].Index;
                int       Id        = Convert.ToInt32(dgvAlerts.SelectedRows[0].Cells["tmp_Id"].Value.ToString());
                Trademark thisTmRec = new Trademark(Id);

                InsertTM frmViewTm = new InsertTM(thisTmRec);
                frmViewTm.MakeAllControlsReadOnly(frmViewTm);
                frmViewTm.GetFromGridOnlyChecked();

                frmViewTm.btnSave.Enabled = false;
                frmViewTm.ShowDialog();
            }
        }
Exemple #7
0
        private void UpdDeposit()
        {
            // Update
            if (dgvStatusViewer.SelectedRows.Count > 0)
            {
                int       dgvIndex = dgvStatusViewer.SelectedRows[0].Index;
                int       TM_Id    = Convert.ToInt32(dgvStatusViewer.SelectedRows[0].Cells["st_TmId"].Value.ToString());
                int       ST_Id    = Convert.ToInt32(dgvStatusViewer.SelectedRows[0].Cells["st_Id"].Value.ToString());
                TM_Status tms      = tmStatusList.Where(i => i.Id == ST_Id).First();
                Trademark tm       = new Trademark(TM_Id);

                if (tm.IsDeleted)
                {
                    MessageBox.Show("Προσοχή! Το Σήμα είναι διαγραμμένο!");
                    return;
                }

                if (UserInfo.Get_DB_AppUser_ResponsibleId(UserInfo.DB_AppUser_Id) != tm.ResponsibleLawyerId && UserInfo.IsAdmin == false)
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΟ Χρήστης πρέπει να έχει οριστεί Υπεύθυνος για το Σήμα.");
                    return;
                }

                if (TM_Status.FinalizedOrRejected(tm.Id) != 0) //Πρέπει να μην έχει ορ./απορ.
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΤο Σήμα έχει ήδη οριστικοποιηθεί!");
                    return;
                }

                InsertTM frmUpdTm = new InsertTM(tm);
                frmUpdTm.ShowDialog();

                if (frmUpdTm.success)
                {
                    //refresh
                    //tmStatusList[tmStatusList.FindIndex(w => w.Id == Id)] = frmUpdDecision.NewRecord;

                    //FillDataGridView(dgvTempRecs, frmUpdTm.NewRecord, dgvIndex);
                    tmStatusList = SelectTmStatusRecs(tms.TmId);
                    FillDataGridView(dgvStatusViewer, tmStatusList);
                }
            }
        }
Exemple #8
0
        private void UpdDeposit()
        {
            // Update
            if (gridView1.SelectedRowsCount > 0)
            {
                int       TM_Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["TmId"]).ToString());
                int       ST_Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString());
                TM_Status tms   = tmStatusList.Where(i => i.Id == ST_Id).First();
                Trademark tm    = new Trademark(TM_Id);

                if (tm.IsDeleted)
                {
                    MessageBox.Show("Προσοχή! Το Σήμα είναι διαγραμμένο!");
                    return;
                }

                if (UserInfo.Get_DB_AppUser_ResponsibleId(UserInfo.DB_AppUser_Id) != tm.ResponsibleLawyerId && UserInfo.IsAdmin == false)
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΟ Χρήστης πρέπει να έχει οριστεί Υπεύθυνος για το Σήμα.");
                    return;
                }

                if (TM_Status.FinalizedOrRejected(tm.Id) != 0) //Πρέπει να μην έχει ορ./απορ.
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΤο Σήμα έχει ήδη οριστικοποιηθεί!");
                    return;
                }

                InsertTM frmUpdTm = new InsertTM(tm);
                frmUpdTm.ShowDialog();

                if (frmUpdTm.success)
                {
                    //refresh
                    tmStatusList = SelectTmStatusRecs(tms.TmId);
                    tmStatusListNullableDates = TM_StatusListToTM_StatusNullableDatesList(tmStatusList);
                    gridControl1.DataSource   = tmStatusListNullableDates;
                }
            }
        }
Exemple #9
0
        private void tsmiUpdTM_Click(object sender, EventArgs e)
        {
            // Update
            if (gridView1.SelectedRowsCount > 0)
            {
                int       Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString());
                Trademark tm = tempRecList.Where(i => i.Id == Id).First();

                if (tm.IsDeleted)
                {
                    MessageBox.Show("Προσοχή! Το Σήμα είναι διαγραμμένο!");
                    return;
                }

                if (UserInfo.Get_DB_AppUser_ResponsibleId(UserInfo.DB_AppUser_Id) != tm.ResponsibleLawyerId && UserInfo.IsAdmin == false)
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΟ Χρήστης πρέπει να έχει οριστεί Υπεύθυνος για το Σήμα.");
                    return;
                }

                if (TM_Status.FinalizedOrRejected(tm.Id) != 0) //Πρέπει να μην έχει ορ./απορ.
                {
                    MessageBox.Show("Προσοχή! Δεν μπορείτε να ενημερώσετε την εγγραφή. \r\nΤο Σήμα έχει ήδη οριστικοποιηθεί!");
                    return;
                }

                InsertTM frmUpdTm = new InsertTM(tm);
                frmUpdTm.ShowDialog();

                if (frmUpdTm.success)
                {
                    tempRecList             = SelectTempRecs_Trademark();  //List
                    tempRecList_Full        = SelectTempRecs(tempRecList); //BindingList
                    gridControl1.DataSource = tempRecList_Full;            //DataSource
                }
            }
        }