Example #1
0
        public void MetaData_AfterGetFormData()
        {
            if (Meta.EditMode)
            {
                return;
            }
            DataRow CurrentRow       = HelpForm.GetLastSelected(DS.regionalrateforcity);
            int     CurrentScaglione = Convert.ToInt16(cmbScaglione.SelectedValue);
            string  filter           = "(ratestart=" + QueryCreator.quotedstrvalue(
                CurrentRow["ratestart"], false) +
                                       ") AND (nbracket = " + QueryCreator.quotedstrvalue(
                CurrentScaglione, false) + ")";

            // verifica se lo scaglione è già stato inserito
            // sulla datainizioaliquota corrente
            DataRow [] res = DS.regionalrateforcity.Select(filter);
            if (res.Length == 0)
            {
                CurrentRow["nbracket"] = cmbScaglione.SelectedValue;
            }
            else
            {
                CurrentRow["nbracket"] = 0;
            }
        }
Example #2
0
        private void btnSituazione_Click(object sender, System.EventArgs e)
        {
            int        esercizio;
            string     codicefondops;
            DataAccess Conn = Meta.Conn;

            try {
                DataRow MyRow = HelpForm.GetLastSelected(DS.pettycash);
                codicefondops = MyRow["idpettycash"].ToString();
            }
            catch {
                return;
            }
            esercizio = Convert.ToInt16(Meta.GetSys("esercizio"));
            DataSet Out = Conn.CallSP("show_pettycash",
                                      new Object[3] {
                Meta.GetSys("datacontabile"),
                esercizio,
                codicefondops
            }
                                      );

            if (Out == null)
            {
                return;
            }
            Out.Tables[0].TableName = "Situazione fondo economale";
            frmSituazioneViewer View = new frmSituazioneViewer(Out);

            View.Show();
        }
Example #3
0
        public void MetaData_AfterFill()
        {
            if (!Meta.CanInsert)
            {
                Meta.CanInsert = true;
                Meta.FreshToolBar();
            }
            //abilita/disabilita i controlli

            bool ModoInsert = Meta.InsertMode;

            cmbLivello.Enabled = false;

            if (ModoInsert)
            {
                DataRow R = HelpForm.GetLastSelected(DS.flowchart);
                if (R == null)
                {
                    return;
                }
                txtCodice.ReadOnly       = false;
                txtOrdineStampa.ReadOnly = false;
                if (Operativo(R))
                {
                    EnableControls(true);
                }
                else
                {
                    EnableControls(false);
                }
            }
            Meta.MarkTableAsNotEntityChild(DS.flowchartuser);
            Meta.MarkTableAsNotEntityChild(DS.flowchartusersorting);
        }
Example #4
0
        private void btnControlli_Click(object sender, System.EventArgs e)
        {
            if (Meta.IsEmpty)
            {
                return;
            }
            DataRow Curr = HelpForm.GetLastSelected(DS.auditcheck);

            if (Curr == null)
            {
                return;
            }
            if (!Meta.GetFormData(true))
            {
                return;
            }
            frmSqlEditor F = new frmSqlEditor(Conn, Curr["sqlcmd"].ToString(), Curr["tablename"].ToString());

            if (F.ShowDialog() == DialogResult.OK)
            {
                Curr["sqlcmd"] = F.SQLstatement;
                txtSql.Text    = F.SQLstatement;
            }
            //RecalcCheck();
        }
Example #5
0
        public void MetaData_AfterGetFormData()
        {
            int flagins = 0;

            if (chkCanInsertFromParentToChild.Checked)
            {
                flagins = flagins + 1;
            }
            if (chkCanNavigateFromParentToChild.Checked)
            {
                flagins = flagins + 2;
            }
            if (chkCustomFilterForNavigation.Checked)
            {
                flagins = flagins + 4;
            }
            if (chkCustomFilterForInsert.Checked)
            {
                flagins = flagins + 8;
            }
            if (chkCustomDefaults.Checked)
            {
                flagins = flagins + 16;
            }

            DataRow Curr   = HelpForm.GetLastSelected(DS.customdirectrel);
            string  filtro = "(tabellaorigine=" + QueryCreator.quotedstrvalue(Curr["fromtable"], true) + "tabelladest=" + QueryCreator.quotedstrvalue(Curr["totable"], true) + ")";

            //	DataRow []DelChilds=DS.tipodocoperiva.Select(filtro,null,DataViewRowState.Deleted);
        }
Example #6
0
        void RicalcolaEnforcementID(object sender, System.EventArgs e)
        {
            if (Meta == null)
            {
                return;
            }
            if (!Meta.DrawStateIsDone)
            {
                return;
            }
            if (!Meta.InsertMode)
            {
                return;
            }
            Meta.GetFormData(true);
            DataRow Curr = HelpForm.GetLastSelected(DS.auditcheck);

            if (Curr == null)
            {
                return;
            }
            if (Curr.RowState != DataRowState.Added)
            {
                MessageBox.Show("ERRORE!");
                return;
            }
            int maxexistent = MetaData.MaxFromColumn(DS.auditcheck, "idcheck");

            Curr["idcheck"] = maxexistent + 1;
        }
Example #7
0
        public void MetaData_AfterFill()
        {
            if (!Meta.CanInsert)
            {
                Meta.CanInsert = true;
                Meta.FreshToolBar();
            }
            bool ModoInsert = Meta.InsertMode;

            grpParte.Enabled   = false;
            cmbLivello.Enabled = false;
            if (ModoInsert)
            {
                DataRow R = HelpForm.GetLastSelected(DS.placcount);
                txtCodice.ReadOnly       = false;
                txtOrdineStampa.ReadOnly = false;
                if (R == null)
                {
                    return;
                }
            }
            if (!Meta.IsEmpty && Meta.EditMode)
            {
                txtCodice.ReadOnly       = true;
                txtOrdineStampa.ReadOnly = true;
            }
        }
Example #8
0
        public void MetaData_AfterFill()
        {
            if (!Meta.CanInsert)
            {
                Meta.CanInsert = true;
                Meta.FreshToolBar();
            }
            //abilita/disabilita i controlli
            bool ModoInsert = Meta.InsertMode;

            cmbLivello.Enabled = false;
            if (ModoInsert)
            {
                DataRow R = HelpForm.GetLastSelected(DS.location);
                if (R == null)
                {
                    return;
                }
                string livello = R["nlevel"].ToString();
                txtCodice.ReadOnly = TipoNumerico(livello);
                if (Operativo(R))
                {
                    txtResponsabile.ReadOnly = false;
                }
                else
                {
                    txtResponsabile.ReadOnly = true;
                }
            }
        }
Example #9
0
        public void MetaData_AfterGetFormData()
        {
            CQueryHelper QHC        = new CQueryHelper();
            DataRow      CurrentRow = HelpForm.GetLastSelected(DS.report);

            if (Meta.InsertMode)
            {
                if (CurrentRow["modulename"].ToString().ToLower() != cmbModuli.SelectedItem.ToString().ToLower())
                {
                    CurrentRow["modulename"] = cmbModuli.SelectedItem;
                }
            }
            if (CurrentRow["groupname"].ToString().ToLower() != cmbGroupName.SelectedItem.ToString().ToLower())
            {
                CurrentRow["groupname"] = cmbGroupName.SelectedItem;
            }
            if (Meta.InsertMode)
            {
                string filtro = QHC.CmpNe("reportname", CurrentRow["reportname"]);
                foreach (DataRow r in DS.reportparameter.Select(filtro))
                {
                    r["reportname"] = CurrentRow["reportname"];
                    //r.AcceptChanges();
                }
            }
        }
Example #10
0
        public void MetaData_AfterFill()
        {
            DataRow lastRow = HelpForm.GetLastSelected(DS.sortinglevel);
            int     flag    = CfgFn.GetNoNullInt32(lastRow["flag"]);

            txtLungCodice.Text = (flag >> 8).ToString();
        }
Example #11
0
        public void MetaData_AfterFill()
        {
            DataRow lsr      = HelpForm.GetLastSelected(DS.cabview);       //Meta.myHelpForm.LastSelectedRow;
            object  idcomune = lsr["idcity"];

            VisualizzaBottoneComune(idcomune);

            // abilita disabilita il combo Moduli
            //cmbBanca.Enabled = ! Meta.InsertMode;
            object idbank = lsr["idbank"];

            /* Al fine di utilizzare il TextBanca per la ricerca:
             * è stato cambiato il tag al text "...?cabview.bank",
             * previo aggiunta campo bank alla vista. E'stato implementato il metodo MySetComboBoxValue()
             * alla stregua del metodo della libreria, perchè si verificava un errore sul cast da
             * 'System.String' a 'System.Data.DataRowView.
             * Si verificava un altro problema:se scrivo %sicilia% e poi effettua Ricerca lui fa una ricerca su
             * cabview col like'%sicilia%' quindi mi fa vedere nel grid tutte le filiali la cui banca è
             * like %sicilia%, quindi se scorro l'elenco delle filiali del grid nel combo/text della banca
             * vedrò : BANCO DI SICILIA SPA, CREDITO SICILIANO S.P.A.,
             * questa cosa è errata perchè io mi aspetto di vedere nel grid SOLO le filiali di
             * BANCO DI SICILIA SPA, se nel combo/text leggo BANCO DI SICILIA SPA.
             * Invece,nel Grid vedo le fliali di entrambe poi, dopo aver selezionato la filiale il combo / tex mi
             * dice la banca.
             * Avedno riscontrato la presenta di tanti problemi si è deciso di rendere il text Banca ReadOnly.
             */


            //IndexChangePilotato = true;
            //MySetComboBoxValue(cmbBanca, idbank);
            //IndexChangePilotato = false;
        }
Example #12
0
        void FreshLogo()
        {
            //Meta = MetaData.GetMetaData(this);
            //pictureBox1.Image=(byte[])(DS.logo[0]["logo"]);
            DataRow Curr = HelpForm.GetLastSelected(DS.logo);

            if (Curr == null)
            {
                return;
            }

            try {
                if (Curr["logo"] != DBNull.Value)
                {
                    MemoryStream MS = new MemoryStream((byte[])Curr["logo"]);
                    Image        IM = new Bitmap(MS, false);
                    pbox.Image = IM;
                }
                else
                {
                    pbox.Image = null;
                }
            }
            catch {
                pbox.Image = null;
            }
        }
Example #13
0
        public void getPorzioneClassificata(out long sommaNum, out long sommaDen)
        {
            sommaDen = 1;
            sommaNum = 1;
            DataRow R = HelpForm.GetLastSelected(DS.tipoclassmovimenti_dest);
            object  codiceTipoClassChild = R["idsorkind"];
            string  filtro = QHC.CmpEq("!sortingkindchild", codiceTipoClassChild);

            foreach (DataRow r in DS.sortingtranslation.Select(filtro))
            {
                if ((r["numerator"] != DBNull.Value) && (r["denominator"] != DBNull.Value))
                {
                    long numeratore   = (int)r["numerator"];
                    long denominatore = (int)r["denominator"];
                    sommaNum  = sommaNum * denominatore - sommaDen * numeratore;
                    sommaDen *= denominatore;
                    long mcd = massimoComuneDivisore(sommaNum, sommaDen);
                    if (mcd == 0)
                    {
                        return;
                    }
                    sommaNum /= mcd;
                    sommaDen /= mcd;
                }
            }
            if (sommaDen < 0)
            {
                sommaNum = -sommaNum;
                sommaDen = -sommaDen;
            }
        }
Example #14
0
        public void MetaData_AfterFill()
        {
            DataRow Curr = HelpForm.GetLastSelected(DS.customdirectrel);

            if (Curr == null)
            {
                return;
            }

            int flagval = (int)DS.customdirectrel.Rows[0]["flag"];

            if ((flagval & 1) == 1)
            {
                chkCanInsertFromParentToChild.Checked = true;
            }
            if ((flagval & 2) == 2)
            {
                chkCanNavigateFromParentToChild.Checked = true;
            }
            if ((flagval & 4) == 4)
            {
                chkCustomFilterForNavigation.Checked = true;
            }
            if ((flagval & 8) == 8)
            {
                chkCustomFilterForInsert.Checked = true;
            }
            if ((flagval & 16) == 16)
            {
                chkCustomDefaults.Checked = true;
            }
        }
Example #15
0
        public void MetaData_AfterFill()
        {
            DataRow CurrSorKind = HelpForm.GetLastSelected(DS.tipoclassmovimenti_dest);

            if (CurrSorKind != null)
            {
                string f = QHC.CmpEq("!sortingkindchild", CurrSorKind["idsorkind"]);
                DS.sortingtranslation.ExtendedProperties["CustomParentRelation"] = f;
            }

            bool ModoInsert = Meta.InsertMode;

            txtCodice.ReadOnly = true;
            cmbLivello.Enabled = false;
            DataRow R = HelpForm.GetLastSelected(DS.sorting);

            if (R == null)
            {
                return;
            }
            object livello = R["nlevel"];

            if (ModoInsert)
            {
                txtCodice.ReadOnly = TipoNumerico(livello);
            }
        }
Example #16
0
        private void btnCopyAll_Click(object sender, EventArgs e)
        {
            MetaData Meta = MetaData.GetMetaData(this);

            if (Meta.IsEmpty)
            {
                return;
            }
            Meta.SaveFormData();
            if (DS.HasChanges())
            {
                return;
            }
            DataRow R = HelpForm.GetLastSelected(DS.ivaregisterkind);

            if (MessageBox.Show("Copiare tutte le informazioni del tipo registro di codice " +
                                R["codeivaregisterkind"].ToString() + " su tutti i dipartimenti?", "Attenzione", MessageBoxButtons.YesNo) !=
                DialogResult.Yes)
            {
                return;
            }

            Meta.Conn.CallSP("copyrow_ivaregisterkind", new object[1] {
                R["idivaregisterkind"]
            });
        }
Example #17
0
        public void MetaData_AfterGetFormData()
        {
            if (Meta.EditMode)
            {
                return;
            }
            DataRow CurrentRow = HelpForm.GetLastSelected(DS.taxrate);

//			int CurrentScaglione = Convert.ToInt16(cmbScaglione.SelectedValue);
//			string filter = "(ratestart="+QueryCreator.quotedstrvalue(
//				CurrentRow["ratestart"],false)+
//				") AND (nbracket = "+QueryCreator.quotedstrvalue(
//				CurrentScaglione,false)+")";
//			// verifica se lo scaglione è già stato inserito
//			// sulla datainizioaliquota corrente
//			DataRow [] res = DS.taxrate.Select(filter);
//			if (res.Length==0){
            try {
                CurrentRow["nbracket"] = cmbScaglione.SelectedValue;
            }
            catch {
                CurrentRow["nbracket"] = 0;
            }
//			}
//			else{
//				CurrentRow["nbracket"]=0;
//			}
        }
Example #18
0
        public void MetaData_AfterGetFormData()
        {
            DataRow lastRow = HelpForm.GetLastSelected(DS.sortinglevel);
            int     codelen = CfgFn.GetNoNullInt32(HelpForm.GetObjectFromString(typeof(int), txtLungCodice.Text, "x.y"));
            int     flag    = CfgFn.GetNoNullInt32(lastRow["flag"]);

            lastRow["flag"] = flag & 0xff | (codelen << 8);
        }
Example #19
0
        public void MetaData_BeforeFill()
        {
            DataRow R = HelpForm.GetLastSelected(DS.checkup);

            if (R != null)
            {
                R["listerrors"]  = QueryCreator.GetPrintable(R["listerrors"].ToString());
                R["checkerrors"] = QueryCreator.GetPrintable(R["checkerrors"].ToString());
                R["corrige"]     = QueryCreator.GetPrintable(R["corrige"].ToString());
            }
        }
Example #20
0
        public void MetaData_AfterFill()
        {
            AbilitaDisabilitaControlliCombo();
            AbilitaDisabilitaRadioBtnAltro();
            CheckControlliCustom();

            //riempie i combo senza tag
            DataRow R = HelpForm.GetLastSelected(DS.reportparameter);

            cmbTipo.SelectedValue = R["systype"];
        }
Example #21
0
 public void MetaData_BeforeRowSelect(DataTable T, DataRow R)
 {
     if (T.TableName == "tipoclassmovimenti_dest")
     {
         DataRow CurrSorKind = HelpForm.GetLastSelected(DS.tipoclassmovimenti_dest);
         if (CurrSorKind != null)
         {
             string f = QHC.CmpEq("!sortingkindchild", CurrSorKind["idsorkind"]);
             DS.sortingtranslation.ExtendedProperties["CustomParentRelation"] = f;
         }
     }
 }
Example #22
0
        void SalvaAllegato(string certification)
        {
            // Legge il file indicato dall'utente e lo scrive nel DB in 'durccertification' o in 'selfcertification'
            if (Meta.IsEmpty)
            {
                return;
            }
            if (!Meta.GetFormData(true))
            {
                return;
            }
            DialogResult dialogResult = opendlg.ShowDialog(this);

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }
            DataRow Curr = HelpForm.GetLastSelected(DS.registrydurc);

            if (Curr == null)
            {
                return;
            }
            FileStream FS         = new FileStream(opendlg.FileName, FileMode.Open, FileAccess.Read);
            string     estensione = Path.GetExtension(FS.Name);

            if (FS == null)
            {
                return;
            }
            int n = (int)FS.Length;

            if (n == 0)
            {
                return;
            }
            int namelen = LengthForFileName(opendlg.FileName);

            try
            {
                byte[] ByteArray = new byte[n + namelen];
                FS.Read(ByteArray, namelen, n);
                if (FS.Length == 0)
                {
                    Curr[certification] = DBNull.Value;
                }
                FS.Close();
                SetBytesForFileName(opendlg.FileName, ByteArray);
                Curr[certification] = ByteArray;
            }
            catch { }
            AbilitaDisabilitaAllegati();
        }
Example #23
0
        private void btnPassword_Click(object sender, System.EventArgs e)
        {
            DataRow      rDep           = HelpForm.GetLastSelected(DS.dbdepartment);
            string       idDbDepartment = (string)rDep["iddbdepartment"];
            FrmPassword  frmPassword    = new FrmPassword(mainConn, idDbDepartment);
            DialogResult dr             = frmPassword.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                DataRow rDepartment = HelpForm.GetLastSelected(DS.dbdepartment);
                rDepartment["!password"] = frmPassword.txtPassword.Text;
            }
        }
Example #24
0
        public void MetaData_AfterGetFormData()
        {
            string filtro1 = "";

            foreach (object LVIO in listViewLog.Items)
            {
                ListViewItem LVI   = (ListViewItem)LVIO;
                DataRow      P2Row = (DataRow)LVI.Tag;
                DataRow      P1Row = HelpForm.GetLastSelected(DS.journaltablesetup);

                if (P1Row == null)
                {
                    return;
                }

                filtro1 = "(tablename=" + QueryCreator.quotedstrvalue(P1Row["tablename"].ToString(), false) + ")" +
                          " AND (opkind=" + QueryCreator.quotedstrvalue(P1Row["opkind"].ToString(), false) + ")" +
                          " AND (dbfield=" + QueryCreator.quotedstrvalue(P2Row["field"].ToString(), false) + ")";

                DataRow [] CurrChilds = DS.journalfieldsetup.Select(filtro1, null, DataViewRowState.CurrentRows);
                DataRow [] DelChilds  = DS.journalfieldsetup.Select(filtro1, null, DataViewRowState.Deleted);

                if ((LVI.Checked) && (CurrChilds.Length == 0))
                {
                    DataRow newMid;
                    if (DelChilds.Length > 0)
                    {
                        DelChilds[0].RejectChanges();
                        newMid = DelChilds[0];
                    }
                    else
                    {
                        newMid = DS.journalfieldsetup.NewRow();
                    }


                    newMid["tablename"] = P1Row["tablename"];
                    newMid["opkind"]    = P1Row["opkind"];
                    newMid["dbfield"]   = P2Row["field"];

                    if (DelChilds.Length == 0)
                    {
                        DS.journalfieldsetup.Rows.Add(newMid);
                    }
                }
                if ((!LVI.Checked) && (CurrChilds.Length > 0))
                {
                    CurrChilds[0].Delete();
                }
            }
        }
Example #25
0
        void SalvaLogo()
        {
            if (Meta.IsEmpty)
            {
                return;
            }
            if (!Meta.GetFormData(true))
            {
                return;
            }
            DialogResult dialogResult = opendlg.ShowDialog(this);

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }
            DataRow Curr = HelpForm.GetLastSelected(DS.logo);

            if (Curr == null)
            {
                return;
            }
            //txtNomeFile.Text = openFileDialog1.FileName;
            FileStream FS = new FileStream(opendlg.FileName, FileMode.Open,
                                           FileAccess.Read);

            if (FS == null)
            {
                return;
            }
            int n = (int)FS.Length;

            if (n == 0)
            {
                return;
            }
            try  {
                byte[] ByteArray = new byte[n];
                FS.Read(ByteArray, 0, n);
                if (FS.Length == 0)
                {
                    Curr["logo"] = DBNull.Value;
                }
                FS.Close();
                Curr["logo"] = ByteArray;
            }
            catch {}
            FreshLogo();
            //	pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);
        }
Example #26
0
        public void MetaData_BeforePost()
        {
            ExBusinessRule = null;
            DataRow Curr = HelpForm.GetLastSelected(DS.audit);

            if (Curr == null)
            {
                return;
            }
            string filter = "(idaudit=" + QueryCreator.quotedstrvalue(
                Curr["idaudit"], true) + ")";

            ExBusinessRule = Meta.Conn.SQLRunner("SELECT DISTINCT tablename,opkind FROM auditcheck WHERE " + filter);
        }
Example #27
0
//		private string getNuovoAlfa1(string passwordDipart) {
//			byte[] alfa = mainConn.sha256UserPassword();
//			byte[] g1 = DataAccess.CryptString(passwordDipart.PadRight(31));
//			byte[] alfa1 = xor(alfa, g1);
//			return QueryCreator.ByteArrayToString(alfa1);
//		}

        public void MetaData_BeforePost()
        {
            DataRow rDepartment = HelpForm.GetLastSelected(DS.dbdepartment);

            if (rDepartment == null)
            {
                return;
            }
            string passwordDipart = rDepartment["!password"] as string;

            textBox1.Text = passwordDipart;

            string       userAmmin    = (string)Meta.Conn.GetSys("user");
            MetaData     metaDBAccess = MetaData.GetMetaData(this, "dbaccess");
            MetaData     metaDBUser   = MetaData.GetMetaData(this, "dbuser");
            UTF8Encoding encoding     = new UTF8Encoding();

            string    filtroUtente = "(login="******")";
            DataTable tUtenti      = DataAccess.RUN_SELECT(mainConn, "dbuser", null, null, filtroUtente, null, null, true);

            DataRow[] rUtenti = tUtenti.Select(filtroUtente);
            if (rUtenti.Length == 0)
            {
                MetaData.SetDefault(DS.dbuser, "login", userAmmin);
                metaDBUser.Get_New_Row(null, DS.dbuser);
            }

            string filtroAccesso = filtroUtente + " and (iddbdepartment="
                                   + QueryCreator.quotedstrvalue(rDepartment["iddbdepartment"], true) + ")";

            DataAccess.RUN_SELECT_INTO_TABLE(mainConn, DS.dbaccess, null, filtroAccesso, null, true);
            MetaData.SetDefault(DS.dbaccess, "login", userAmmin);

            string iddbdepartment = (string)rDepartment["iddbdepartment"];
            string errore;

            byte[] g1 = mainConn.getDepartmentPassword(iddbdepartment, out errore);
            if (g1 == null)
            {
                metaDBAccess.Get_New_Row(rDepartment, DS.dbaccess);
                g1 = Easy_DataAccess.CryptString(passwordDipart.PadRight(31));
            }
            DataRow[] righeAccesso = rDepartment.GetChildRows("dbdepartmentdbaccess");
            foreach (DataRow rAccess in righeAccesso)
            {
                byte[] alfa  = mainConn.sha256UserPassword();
                byte[] alfa1 = xor(alfa, g1);
                rAccess["alpha1"] = QueryCreator.ByteArrayToString(alfa1);
            }
        }
Example #28
0
        public void MetaData_AfterFill()
        {
            if (Meta.FirstFillForThisRow)
            {
                btnAccertamento.Enabled = true;
            }

            DataRow CurrSorKind = HelpForm.GetLastSelected(DS.sortingkind);

            if (CurrSorKind != null)
            {
                string f = QHC.CmpEq("!idsorkind", CurrSorKind["idsorkind"]);
                DS.admpay_incomesorted.ExtendedProperties["CustomParentRelation"] = f;
            }
        }
Example #29
0
 public void MetaData_AfterClear()
 {
     txtCodice.ReadOnly = false;
     if (HelpForm.GetLastSelected(DS.listclass) == null)
     {
         Meta.CanInsert = false;
     }
     else
     {
         Meta.CanInsert = true;
     }
     btnInsDettagli.Visible = false;
     rdbServizi.Checked     = false;
     rdbBeni.Checked        = false;
     AbilitaBeniServizi();
 }
Example #30
0
        private void btnControlli_Click(object sender, System.EventArgs e)
        {
            DataRow CurrBusiness = HelpForm.GetLastSelected(DS.audit);

            if (CurrBusiness == null)
            {
                return;
            }
            MetaData MetaRule = MetaData.GetMetaData(this, "auditcheck");

            MetaRule.StartFilter = "(idaudit=" +
                                   QueryCreator.quotedstrvalue(CurrBusiness["idaudit"], true) + ")";
            MetaRule.ExtraParameter = CurrBusiness["idaudit"];
            MetaRule.Edit(this.ParentForm, "child", false);
            MetaRule.DoMainCommand("maindosearch.default");
        }