コード例 #1
0
        internal protected override ControloAutDragDrop.NotPresentInIndexResults NotPresentInIndex(GISA.Model.GISADataset.ControloAutRow ControloAutRow)
        {
            if (GisaDataSetHelper.GetInstance().SFRDAutor.Select("IDFRDBase=" + FRDBaseRow.ID.ToString() + " AND IDControloAut=" + ControloAutRow.ID.ToString()).Length == 0)
            {
                DataRow[] deletedRows = GisaDataSetHelper.GetInstance().SFRDAutor.Select("", "", DataViewRowState.Deleted);

                if (deletedRows.Length > 0)
                {
                    foreach (DataRow deletedRow in deletedRows)
                    {
                        if (((long)(deletedRow["IDFRDBase", DataRowVersion.Original])) == FRDBaseRow.ID && ((long)(deletedRow["IDControloAut", DataRowVersion.Original])) == ControloAutRow.ID)
                        {
                            deletedRow.RejectChanges();
                            return NotPresentInIndexResults.PresentInIndexDeleted;
                        }
                    }
                }
                return NotPresentInIndexResults.NotPresentInIndex;
            }
            else
                return NotPresentInIndexResults.PresentInIndex;
        }
コード例 #2
0
 public string FormatYearsInterval(GISA.Model.GISADataset.RelacaoHierarquicaRow rhRow)
 {
     string anoInicio = GISA.Model.GisaDataSetHelper.GetDBNullableText(rhRow, "InicioAno");
     string anoFim = GISA.Model.GisaDataSetHelper.GetDBNullableText(rhRow, "FimAno");
     return FormatYearsInterval(anoInicio, anoFim);
 }
コード例 #3
0
        // garantir que o tipo de quantidade da descrição física existe aquando da sua gravação na BD
        private void TipoAcondicionamentoIsBeingUsedByOthers(GISA.Model.PersistencyHelper.PreConcArguments args)
        {
            GISA.Model.PersistencyHelper.ManageDescFisicasPreConcArguments mcfPca = null;
            mcfPca = (GISA.Model.PersistencyHelper.ManageDescFisicasPreConcArguments)args;
            GISADataset.FRDBaseRow frd = (GISADataset.FRDBaseRow)(GisaDataSetHelper.GetInstance().FRDBase.Select("ID=" + mcfPca.frdID.ToString())[0]);
            ArrayList quantList = mcfPca.quant;

            int nTQuant = 0;
            GISADataset.TipoAcondicionamentoRow row = null;
            try
            {
                foreach (long quant in quantList)
                {
                    row = (GISADataset.TipoAcondicionamentoRow)(GisaDataSetHelper.GetInstance().TipoAcondicionamento.Select("ID=" + quant.ToString(), "", DataViewRowState.Deleted)[0]);
                    nTQuant = FRDRule.Current.CountUFDimensoesAcumuladas(quant, mcfPca.tran);
                    System.Data.DataSet tempgisaBackup1 = mcfPca.gisaBackup;
                    PersistencyHelper.BackupRow(ref tempgisaBackup1, row);
                    mcfPca.gisaBackup = tempgisaBackup1;
                    if (nTQuant > 0)
                    {
                        row.RejectChanges();
                        mcfPca.aResult = PersistencyHelper.ManageDescFisicasPreConcArguments.ActionResult.quantidadeUsedByOthers;
                    }
                }
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw ex;
            }
        }
コード例 #4
0
		private void listView1_SelectedIndexChanging(object sender, GISA.Controls.ItemChangingEventArgs e)
		{
			textBox1.Text = textBox1.Text + Environment.NewLine + "listView1_SelectedIndexChanging";		
		}		
コード例 #5
0
ファイル: FormSelectNivel.cs プロジェクト: aureliopires/gisa
 void nivelNavigator1_BeforeNodeSelection(GISA.Controls.Localizacao.ControloNivelList.BeforeNewSelectionEventArgs e)
 {
     btnOk.Enabled = false;
 }