Exemplo n.º 1
0
        private void Ricerca()
        {
            Classi.ClassiAnagrafiche.Contab _Contab = new TheSite.Classi.ClassiAnagrafiche.Contab();


            this.txtsDescrizione.DBDefaultValue = "%";


            this.txtsDescrizione.Text = this.txtsDescrizione.Text.Trim();

            S_ControlsCollection _SCollection = new S_ControlsCollection();


            S_Controls.Collections.S_Object s_descrizione = new S_Object();
            s_descrizione.ParameterName = "p_DESCRIZIONE";
            s_descrizione.DbType        = CustomDBType.VarChar;
            s_descrizione.Direction     = ParameterDirection.Input;
            s_descrizione.Size          = 255;
            s_descrizione.Index         = _SCollection.Count;;
            s_descrizione.Value         = txtsDescrizione.Text;
            _SCollection.Add(s_descrizione);

            S_Controls.Collections.S_Object s_mese = new S_Object();
            s_mese.ParameterName = "p_mese";
            s_mese.DbType        = CustomDBType.VarChar;
            s_mese.Direction     = ParameterDirection.Input;
            s_mese.Size          = 10;
            s_mese.Index         = _SCollection.Count;;
            s_mese.Value         = DropMese.SelectedValue;
            _SCollection.Add(s_mese);

            S_Controls.Collections.S_Object s_anni = new S_Object();
            s_anni.ParameterName = "p_anno";
            s_anni.DbType        = CustomDBType.Integer;
            s_anni.Direction     = ParameterDirection.Input;
            s_anni.Size          = 10;
            s_anni.Index         = _SCollection.Count;;
            s_anni.Value         = int.Parse(S_anno.SelectedValue);;
            _SCollection.Add(s_anni);



            DataSet _MyDs = _Contab.GetData_Canone(_SCollection);

            this.DataGridRicerca.DataSource = _MyDs.Tables[0];
            if (_MyDs.Tables[0].Rows.Count == 0)
            {
                DataGridRicerca.CurrentPageIndex = 0;
            }
            else
            {
                int Pagina = 0;
                if ((_MyDs.Tables[0].Rows.Count % DataGridRicerca.PageSize) > 0)
                {
                    Pagina++;
                }
                if (DataGridRicerca.PageCount != Convert.ToInt16((_MyDs.Tables[0].Rows.Count / DataGridRicerca.PageSize) + Pagina))
                {
                    DataGridRicerca.CurrentPageIndex = 0;
                }
            }

            this.DataGridRicerca.DataBind();
            this.GridTitle1.NumeroRecords = _MyDs.Tables[0].Rows.Count.ToString();
        }
Exemplo n.º 2
0
        private void SaveInvio(string FileName, DocType TipoDoc)
        {
            S_ControlsCollection _SColl = new S_ControlsCollection();


            S_Object p = new S_Object();

            p.ParameterName = "p_id";
            p.DbType        = CustomDBType.Integer;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Value         = 0;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_NOME_DOC";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 255;
            p.Value         = Path.GetFileName(FileName);
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_DATA_INVIO";
            p.DbType        = CustomDBType.Date;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 15;
            p.Value         = DateTime.Now;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_USERS";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 255;
            p.Value         = Context.User.Identity.Name;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_TIPO_DOC";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 32;
            p.Value         = TipoDoc.ToString();
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_CODICE";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 255;
            p.Value         = this.HSga.ToString();
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_ID_WR";
            p.DbType        = CustomDBType.Integer;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Value         = this.txtWrHidden.Text;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_ID_BL";
            p.DbType        = CustomDBType.Integer;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Value         = this.id_bl;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_CODICE_BL";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 255;
            p.Value         = lblCodiceEdificio.Text;
            _SColl.Add(p);

            p = new S_Object();
            p.ParameterName = "p_Operazione";
            p.DbType        = CustomDBType.VarChar;
            p.Direction     = ParameterDirection.Input;
            p.Index         = _SColl.Count;
            p.Size          = 255;
            p.Value         = "Insert";
            _SColl.Add(p);

            int result = _ClManCorrettiva.ExecuteTracciaDoc(_SColl);
        }
Exemplo n.º 3
0
 protected override int ExecuteUpdate(S_ControlsCollection CollezioneControlli, ExecuteType Operazione, int itemId)
 {
     return(0);
 }
Exemplo n.º 4
0
        public DataSet GetReport_(int TipoReport, int bl_id, int servizio, int stdapparato)
        {
            DataSet _Ds;

            S_ControlsCollection CollezioneControlli = new S_ControlsCollection();

            if (TipoReport == 0)
            {
                S_Controls.Collections.S_Object p_blid = new S_Object();
                p_blid.ParameterName = "p_bl_Id";
                p_blid.DbType        = CustomDBType.Integer;
                p_blid.Direction     = ParameterDirection.Input;
                p_blid.Index         = CollezioneControlli.Count;
                p_blid.Value         = bl_id;
                CollezioneControlli.Add(p_blid);
            }
            if (TipoReport == 1 || TipoReport == 0)
            {
                S_Controls.Collections.S_Object s_UserName = new S_Object();
                s_UserName.ParameterName = "p_UserName";
                s_UserName.DbType        = CustomDBType.VarChar;
                s_UserName.Direction     = ParameterDirection.Input;
                s_UserName.Index         = CollezioneControlli.Count;
                s_UserName.Value         = this.s_username;
                s_UserName.Size          = 50;
                CollezioneControlli.Add(s_UserName);
            }

            if (TipoReport == 2)
            {
                S_Controls.Collections.S_Object p_idservizio = new S_Object();
                p_idservizio.ParameterName = "p_idservizio";
                p_idservizio.DbType        = CustomDBType.Integer;
                p_idservizio.Direction     = ParameterDirection.Input;
                p_idservizio.Index         = CollezioneControlli.Count;
                p_idservizio.Value         = servizio;
                CollezioneControlli.Add(p_idservizio);


                S_Controls.Collections.S_Object p_stdapparato = new S_Object();
                p_stdapparato.ParameterName = "p_stdapparato";
                p_stdapparato.DbType        = CustomDBType.Integer;
                p_stdapparato.Direction     = ParameterDirection.Input;
                p_stdapparato.Index         = CollezioneControlli.Count;
                p_stdapparato.Value         = stdapparato;
                CollezioneControlli.Add(p_stdapparato);

                S_Controls.Collections.S_Object s_UserName = new S_Object();
                s_UserName.ParameterName = "p_UserName";
                s_UserName.DbType        = CustomDBType.VarChar;
                s_UserName.Direction     = ParameterDirection.Input;
                s_UserName.Index         = CollezioneControlli.Count;
                s_UserName.Value         = this.s_username;
                s_UserName.Size          = 50;
                CollezioneControlli.Add(s_UserName);
            }

            S_Controls.Collections.S_Object s_Cursor = new S_Object();
            s_Cursor.ParameterName = "IO_CURSOR";
            s_Cursor.DbType        = CustomDBType.Cursor;
            s_Cursor.Direction     = ParameterDirection.Output;
            s_Cursor.Index         = CollezioneControlli.Count;
            CollezioneControlli.Add(s_Cursor);

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);
            string s_StrSql = "";

            if (TipoReport == 0)
            {
                s_StrSql = "PACK_APPARECCHIATURE.SP_GETSTD1";
            }
            if (TipoReport == 1)
            {
                s_StrSql = "PACK_APPARECCHIATURE.SP_GETSTD2";
            }
            if (TipoReport == 2)
            {
                s_StrSql = "PACK_APPARECCHIATURE.SP_GETSTD3__";
            }
            if (TipoReport == 3)
            {
                s_StrSql = "PACK_APPARECCHIATURE.SP_GETSTD4";
            }
            if (TipoReport == 4)
            {
                s_StrSql = "PACK_APPARECCHIATURE.SP_GETSTD5";
            }


            _Ds = _OraDl.GetRows(CollezioneControlli, s_StrSql).Copy();

            return(_Ds);
        }
Exemplo n.º 5
0
        private long CalcolaTot()
        {
            Classi.AnagrafeImpianti.Apparecchiature _Richiesta = new TheSite.Classi.AnagrafeImpianti.Apparecchiature();
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_p_Wr_Id = new S_Controls.Collections.S_Object();
            s_p_Wr_Id.ParameterName = "p_Wr_Id";
            s_p_Wr_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wr_Id.Direction     = ParameterDirection.Input;
            s_p_Wr_Id.Index         = 2;
            s_p_Wr_Id.Size          = 50;
            s_p_Wr_Id.Value         = (this.txtsRichiesta.Text == "")?0:Int32.Parse(this.txtsRichiesta.Text);
            _SCollection.Add(s_p_Wr_Id);

            S_Controls.Collections.S_Object s_p_Addetto = new S_Controls.Collections.S_Object();
            s_p_Addetto.ParameterName = "p_Addetto";
            s_p_Addetto.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Addetto.Direction     = ParameterDirection.Input;
            s_p_Addetto.Index         = 3;
            s_p_Addetto.Size          = 50;
            s_p_Addetto.Value         = this.Addetti1.NomeCompleto;
            _SCollection.Add(s_p_Addetto);

            S_Controls.Collections.S_Object s_p_DataDa = new S_Controls.Collections.S_Object();
            s_p_DataDa.ParameterName = "p_DataDa";
            s_p_DataDa.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataDa.Direction     = ParameterDirection.Input;
            s_p_DataDa.Index         = 4;
            s_p_DataDa.Size          = 10;
            s_p_DataDa.Value         = (CalendarPicker1.Datazione.Text == "")? "":CalendarPicker1.Datazione.Text;
            _SCollection.Add(s_p_DataDa);

            S_Controls.Collections.S_Object s_p_DataA = new S_Controls.Collections.S_Object();
            s_p_DataA.ParameterName = "p_DataA";
            s_p_DataA.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataA.Direction     = ParameterDirection.Input;
            s_p_DataA.Index         = 5;
            s_p_DataA.Size          = 10;
            s_p_DataA.Value         = (CalendarPicker2.Datazione.Text == "")? "":CalendarPicker2.Datazione.Text;
            _SCollection.Add(s_p_DataA);

            S_Controls.Collections.S_Object s_p_Wo_Id = new S_Controls.Collections.S_Object();
            s_p_Wo_Id.ParameterName = "p_Wo_Id";
            s_p_Wo_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wo_Id.Direction     = ParameterDirection.Input;
            s_p_Wo_Id.Index         = 6;
            s_p_Wo_Id.Size          = 50;
            s_p_Wo_Id.Value         = (this.txtsOrdine.Text == "")?0:Int32.Parse(this.txtsOrdine.Text);
            _SCollection.Add(s_p_Wo_Id);

            S_Controls.Collections.S_Object s_p_Status = new S_Controls.Collections.S_Object();
            s_p_Status.ParameterName = "p_Status";
            s_p_Status.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Status.Direction     = ParameterDirection.Input;
            s_p_Status.Index         = 8;
            s_p_Status.Value         = (cmbsStatus.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsStatus.SelectedValue);
            _SCollection.Add(s_p_Status);

            DataSet _MyDsTot = _Richiesta.GetTotRDLEQ(_SCollection, DataGridRicerca.PageSize, DataGridRicerca.CurrentPageIndex).Copy();
            DataRow _DR      = _MyDsTot.Tables[0].Rows[0];

            return(long.Parse(_DR[0].ToString()));
        }
Exemplo n.º 6
0
 public override int Add(S_ControlsCollection CollezioneControlli)
 {
     return(base.Add(CollezioneControlli));
 }
Exemplo n.º 7
0
        public DataSet GetSpecializzazionePMP(int PMP_id, int eqstd_id, int servizio_id)
        {
            DataSet _Ds;

            S_ControlsCollection CollezioneControlli = new S_ControlsCollection();

            //BL_ID Lo passo sempre vuoto
            S_Controls.Collections.S_Object s_BL_id = new S_Object();
            s_BL_id.ParameterName = "p_Bl_Id";
            s_BL_id.DbType        = CustomDBType.VarChar;
            s_BL_id.Value         = "";
            s_BL_id.Direction     = ParameterDirection.Input;
            s_BL_id.Index         = 0;
            s_BL_id.Size          = 20;

            CollezioneControlli.Add(s_BL_id);

            //Servizio ID
            S_Controls.Collections.S_Object s_Servizio_id = new S_Object();
            s_Servizio_id.ParameterName = "p_ID_Servizio";
            s_Servizio_id.DbType        = CustomDBType.Integer;
            s_Servizio_id.Value         = servizio_id;
            s_Servizio_id.Direction     = ParameterDirection.Input;
            s_Servizio_id.Index         = 1;

            CollezioneControlli.Add(s_Servizio_id);

            //Eqstd ID
            S_Controls.Collections.S_Object s_Eqstd_id = new S_Object();
            s_Eqstd_id.ParameterName = "p_eqstd_id";
            s_Eqstd_id.DbType        = CustomDBType.Integer;
            s_Eqstd_id.Value         = eqstd_id;
            s_Eqstd_id.Direction     = ParameterDirection.Input;
            s_Eqstd_id.Index         = 2;

            CollezioneControlli.Add(s_Eqstd_id);

            //Eq ID
            S_Controls.Collections.S_Object s_Eq_id = new S_Object();
            s_Eq_id.ParameterName = "p_eq_id";
            s_Eq_id.DbType        = CustomDBType.VarChar;
            s_Eq_id.Value         = "";
            s_Eq_id.Direction     = ParameterDirection.Input;
            s_Eq_id.Index         = 3;
            s_Eq_id.Size          = 50;

            CollezioneControlli.Add(s_Eq_id);

            S_Controls.Collections.S_Object s_PMP_id = new S_Object();
            s_PMP_id.ParameterName = "p_PMP_id";
            s_PMP_id.DbType        = CustomDBType.Integer;
            s_PMP_id.Value         = PMP_id;
            s_PMP_id.Direction     = ParameterDirection.Input;
            s_PMP_id.Index         = 4;

            CollezioneControlli.Add(s_PMP_id);

            S_Controls.Collections.S_Object s_UserName = new S_Object();
            s_UserName.ParameterName = "p_UserName";
            s_UserName.DbType        = CustomDBType.VarChar;
            s_UserName.Direction     = ParameterDirection.Input;
            s_UserName.Index         = 5;
            s_UserName.Size          = 50;
            s_UserName.Value         = System.Web.HttpContext.Current.User.Identity.Name;
            CollezioneControlli.Add(s_UserName);

            S_Controls.Collections.S_Object s_Cursor = new S_Object();
            s_Cursor.ParameterName = "IO_CURSOR";
            s_Cursor.DbType        = CustomDBType.Cursor;
            s_Cursor.Direction     = ParameterDirection.Output;
            s_Cursor.Index         = 6;

            CollezioneControlli.Add(s_Cursor);

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);
            string s_StrSql = "PACK_ADDETTI.SP_GETSPECIALIZZAZIONI";

            _Ds = _OraDl.GetRows(CollezioneControlli, s_StrSql).Copy();

            return(_Ds);
        }
Exemplo n.º 8
0
        private S_ControlsCollection CreaCriteri()
        {
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_p_Bl_Id = new S_Controls.Collections.S_Object();
            s_p_Bl_Id.ParameterName = "p_Bl_Id";
            s_p_Bl_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Bl_Id.Direction     = ParameterDirection.Input;
            s_p_Bl_Id.Size          = 50;
            s_p_Bl_Id.Index         = 0;
            s_p_Bl_Id.Value         = RicercaModulo1.TxtCodice.Text;
            _SCollection.Add(s_p_Bl_Id);

            S_Controls.Collections.S_Object s_p_campus = new S_Controls.Collections.S_Object();
            s_p_campus.ParameterName = "p_campus";
            s_p_campus.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_campus.Direction     = ParameterDirection.Input;
            s_p_campus.Index         = 1;
            s_p_campus.Size          = 50;
            s_p_campus.Value         = RicercaModulo1.TxtRicerca.Text;
            _SCollection.Add(s_p_campus);

            S_Controls.Collections.S_Object s_p_Wr_Id = new S_Controls.Collections.S_Object();
            s_p_Wr_Id.ParameterName = "p_Wr_Id";
            s_p_Wr_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wr_Id.Direction     = ParameterDirection.Input;
            s_p_Wr_Id.Index         = 2;
            s_p_Wr_Id.Size          = 50;
            s_p_Wr_Id.Value         = (this.txtsRichiesta.Text == "")?0:Int32.Parse(this.txtsRichiesta.Text);
            _SCollection.Add(s_p_Wr_Id);

            S_Controls.Collections.S_Object s_p_Addetto = new S_Controls.Collections.S_Object();
            s_p_Addetto.ParameterName = "p_Addetto";
            s_p_Addetto.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Addetto.Direction     = ParameterDirection.Input;
            s_p_Addetto.Index         = 3;
            s_p_Addetto.Size          = 50;
            s_p_Addetto.Value         = this.Addetti1.NomeCompleto;
            _SCollection.Add(s_p_Addetto);

            S_Controls.Collections.S_Object s_p_DataDa = new S_Controls.Collections.S_Object();
            s_p_DataDa.ParameterName = "p_DataDa";
            s_p_DataDa.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataDa.Direction     = ParameterDirection.Input;
            s_p_DataDa.Index         = 4;
            s_p_DataDa.Size          = 10;
            s_p_DataDa.Value         = (CalendarPicker1.Datazione.Text == "")? "":CalendarPicker1.Datazione.Text;
            _SCollection.Add(s_p_DataDa);

            S_Controls.Collections.S_Object s_p_DataA = new S_Controls.Collections.S_Object();
            s_p_DataA.ParameterName = "p_DataA";
            s_p_DataA.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataA.Direction     = ParameterDirection.Input;
            s_p_DataA.Index         = 5;
            s_p_DataA.Size          = 10;
            s_p_DataA.Value         = (CalendarPicker2.Datazione.Text == "")? "":CalendarPicker2.Datazione.Text;
            _SCollection.Add(s_p_DataA);

            S_Controls.Collections.S_Object s_p_Wo_Id = new S_Controls.Collections.S_Object();
            s_p_Wo_Id.ParameterName = "p_Wo_Id";
            s_p_Wo_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wo_Id.Direction     = ParameterDirection.Input;
            s_p_Wo_Id.Index         = 6;
            s_p_Wo_Id.Size          = 50;
            s_p_Wo_Id.Value         = (this.txtsOrdine.Text == "")?0:Int32.Parse(this.txtsOrdine.Text);
            _SCollection.Add(s_p_Wo_Id);

            S_Controls.Collections.S_Object s_p_Servizio = new S_Controls.Collections.S_Object();
            s_p_Servizio.ParameterName = "p_ID_Servizio";
            s_p_Servizio.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Servizio.Direction     = ParameterDirection.Input;
            s_p_Servizio.Index         = 7;
            s_p_Servizio.Value         = (cmbsServizio.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsServizio.SelectedValue);
            _SCollection.Add(s_p_Servizio);

            S_Controls.Collections.S_Object s_p_Status = new S_Controls.Collections.S_Object();
            s_p_Status.ParameterName = "p_Status";
            s_p_Status.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Status.Direction     = ParameterDirection.Input;
            s_p_Status.Index         = 8;
            if (HiddenVisible.Value == "1")
            {
                s_p_Status.Value = 3;
            }
            else
            {
                s_p_Status.Value = (cmbsStatus.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsStatus.SelectedValue);
            }
            _SCollection.Add(s_p_Status);

            S_Controls.Collections.S_Object s_p_Richiedente = new S_Controls.Collections.S_Object();
            s_p_Richiedente.ParameterName = "p_Richiedente";
            s_p_Richiedente.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Richiedente.Direction     = ParameterDirection.Input;
            s_p_Richiedente.Index         = 9;
            s_p_Richiedente.Size          = 50;
            s_p_Richiedente.Value         = this.Richiedenti1.NomeCompleto;
            _SCollection.Add(s_p_Richiedente);

            S_Controls.Collections.S_Object s_p_Priority = new S_Controls.Collections.S_Object();
            s_p_Priority.ParameterName = "p_Priority";
            s_p_Priority.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Priority.Direction     = ParameterDirection.Input;
            s_p_Priority.Index         = 10;
            s_p_Priority.Value         = (cmbsUrgenza.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsUrgenza.SelectedValue);
            _SCollection.Add(s_p_Priority);

            S_Controls.Collections.S_Object s_p_Descrizione = new S_Controls.Collections.S_Object();
            s_p_Descrizione.ParameterName = "p_Descrizione";
            s_p_Descrizione.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Descrizione.Direction     = ParameterDirection.Input;
            s_p_Descrizione.Index         = 11;
            s_p_Descrizione.Size          = 255;
            s_p_Descrizione.Value         = txtDescrizione.Text;
            _SCollection.Add(s_p_Descrizione);

            S_Controls.Collections.S_Object s_p_Gruppo = new S_Controls.Collections.S_Object();
            s_p_Gruppo.ParameterName = "p_Gruppo";
            s_p_Gruppo.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Gruppo.Direction     = ParameterDirection.Input;
            s_p_Gruppo.Index         = 12;
            s_p_Gruppo.Value         = (cmbsGruppo.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsGruppo.SelectedValue);
            _SCollection.Add(s_p_Gruppo);

            if (HiddenVisible.Value == "3")
            {
                S_Controls.Collections.S_Object s_p_RDL_PADRE = new S_Controls.Collections.S_Object();
                s_p_RDL_PADRE.ParameterName = "p_RDL_PADRE";
                s_p_RDL_PADRE.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
                s_p_RDL_PADRE.Direction     = ParameterDirection.Input;
                s_p_RDL_PADRE.Index         = 13;
                s_p_RDL_PADRE.Size          = 50;
                s_p_RDL_PADRE.Value         = (this.txtRdl.Text == "")?0:Int32.Parse(this.txtRdl.Text);
                _SCollection.Add(s_p_RDL_PADRE);
            }

            return(_SCollection);
        }
Exemplo n.º 9
0
        private void btAccorpa_Click(object sender, System.EventArgs e)
        {
            MemorizzaCheck();
            if (Session["CheckedList"] != null)
            {
                Hashtable             _HS          = (Hashtable)Session["CheckedList"];
                IDictionaryEnumerator myEnumerator = _HS.GetEnumerator();


                Classi.ManProgrammata.AccorpaRdl _AccorpaRdl = new TheSite.Classi.ManProgrammata.AccorpaRdl(this.Context.User.Identity.Name);
                _AccorpaRdl.beginTransaction();

                try
                {
                    while (myEnumerator.MoveNext())
                    {
                        if (Convert.ToBoolean(myEnumerator.Value) == false)
                        {
                            continue;
                        }

                        S_ControlsCollection CollezioneControlli = new S_ControlsCollection();

                        S_Controls.Collections.S_Object s_p_wr_padre = new S_Object();
                        s_p_wr_padre.ParameterName = "p_wr_padre";
                        s_p_wr_padre.DbType        = CustomDBType.Integer;
                        s_p_wr_padre.Direction     = ParameterDirection.Input;
                        s_p_wr_padre.Index         = 0;
                        s_p_wr_padre.Value         = int.Parse(lblPadreAccorpante.Text);
                        CollezioneControlli.Add(s_p_wr_padre);

                        S_Controls.Collections.S_Object s_p_wr_figlia = new S_Object();
                        s_p_wr_figlia.ParameterName = "p_wr_figlia";
                        s_p_wr_figlia.DbType        = CustomDBType.Integer;
                        s_p_wr_figlia.Direction     = ParameterDirection.Input;
                        s_p_wr_figlia.Index         = 1;
                        s_p_wr_figlia.Value         = Convert.ToInt32(myEnumerator.Key);
                        CollezioneControlli.Add(s_p_wr_figlia);

                        S_Controls.Collections.S_Object s_p_utente = new S_Object();
                        s_p_utente.ParameterName = "p_utente";
                        s_p_utente.DbType        = CustomDBType.VarChar;
                        s_p_utente.Direction     = ParameterDirection.Input;
                        s_p_utente.Index         = 2;
                        s_p_utente.Size          = 50;
                        s_p_utente.Value         = Context.User.Identity.Name;
                        CollezioneControlli.Add(s_p_utente);

                        _AccorpaRdl.Add(CollezioneControlli);
                    }

                    _AccorpaRdl.commitTransaction();

                    Session.Remove("CheckedList");
                    DataGridRicerca.CurrentPageIndex = 0;
                    RicercaAccorpate();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
//					_AccorpaRdl.rollbackTransaction();
                }
            }
        }
Exemplo n.º 10
0
 /// <summary>
 /// Elimina il Record a DCSIT se l'ultimo parametro e True, Altrimenti elimina il record a DL
 /// se l'ultimo parametro e False.
 /// </summary>
 /// <param name="CollezioneControlli"></param>
 /// <param name="DCSTIT"></param>
 /// <returns></returns>
 public int DeleteDCSTI_DL(S_ControlsCollection CollezioneControlli, int itemId, bool DCSTIT)
 {
     return(ExecuteUpdateDCSIT_DL(CollezioneControlli, ExecuteType.Delete, itemId, DCSTIT));
 }
Exemplo n.º 11
0
        private int  EseguiDataBaseMateriale(int id, Classi.ExecuteType Operazione,
                                             int idMateriale, double prezzoUnitario, int quantita, double prezzoTotale)
        {
            int                  i_Result     = 0;
            ClManCorrettiva      ioDati       = new ClManCorrettiva();
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            int cntParametro = 0;

            S_Object pId = new S_Object();

            pId.ParameterName = "p_ID";
            pId.DbType        = CustomDBType.Integer;
            pId.Direction     = ParameterDirection.Input;
            pId.Index         = cntParametro++;
            pId.Value         = id;
            _SCollection.Add(pId);

            S_Object pIdwr = new S_Object();

            pIdwr.ParameterName = "p_WrId";
            pIdwr.DbType        = CustomDBType.Integer;
            pIdwr.Direction     = ParameterDirection.Input;
            pIdwr.Index         = cntParametro++;
            pIdwr.Value         = _wrId;
            _SCollection.Add(pIdwr);

            S_Object pIdMateriale = new S_Object();

            pIdMateriale.ParameterName = "p_IdMateriale";
            pIdMateriale.DbType        = CustomDBType.Integer;
            pIdMateriale.Direction     = ParameterDirection.Input;
            pIdMateriale.Index         = cntParametro++;
            pIdMateriale.Value         = idMateriale;
            _SCollection.Add(pIdMateriale);

            S_Object pPrezzoUnitario = new S_Object();

            pPrezzoUnitario.ParameterName = "p_PrezzoUnitario";
            pPrezzoUnitario.DbType        = CustomDBType.Double;
            pPrezzoUnitario.Direction     = ParameterDirection.Input;
            pPrezzoUnitario.Index         = cntParametro++;
            pPrezzoUnitario.Value         = prezzoUnitario;
            _SCollection.Add(pPrezzoUnitario);

            S_Object pQuantita = new S_Object();

            pQuantita.ParameterName = "p_Quantita";
            pQuantita.DbType        = CustomDBType.Integer;
            pQuantita.Direction     = ParameterDirection.Input;
            pQuantita.Index         = cntParametro++;
            pQuantita.Value         = quantita;
            _SCollection.Add(pQuantita);

            S_Object pTotale = new S_Object();

            pTotale.ParameterName = "p_Totale";
            pTotale.DbType        = CustomDBType.Double;
            pTotale.Direction     = ParameterDirection.Input;
            pTotale.Index         = cntParametro++;
            pTotale.Value         = prezzoTotale;
            _SCollection.Add(pTotale);

            i_Result = ioDati.ExecuteMateriali(_SCollection, Operazione);

            //Faccio i conti
//			Classi.ManCorrettiva.ClManCorrettiva _Totale = new TheSite.Classi.ManCorrettiva.ClManCorrettiva();
//			DataSet DsManodoperaCosti = _Totale.TotManodopera(Convert.ToInt32(_wrId));
//			if(DsManodoperaCosti.Tables[0].Rows.Count>0)
//				tot=Convert.ToDouble(DsManodoperaCosti.Tables[0].Rows[0]["totmateriale"]);
//			lblTot.Text=Convert.ToString(tot);
            //

            return(i_Result);
        }
Exemplo n.º 12
0
 /// <summary>
 /// Aggiunge un Record a DCSIT se l'ultimo parametro e True, Altrimenti aggiunge un record a DL
 /// se l'ultimo parametro e False.
 /// </summary>
 /// <param name="CollezioneControlli"></param>
 /// <param name="DCSTIT"></param>
 /// <returns></returns>
 public int AddDCSTI_DL(S_ControlsCollection CollezioneControlli, bool DCSTIT)
 {
     return(ExecuteUpdateDCSIT_DL(CollezioneControlli, ExecuteType.Insert, 0, DCSTIT));
 }
Exemplo n.º 13
0
        protected override int ExecuteUpdate(S_ControlsCollection CollezioneControlli, ExecuteType Operazione, int itemId)
        {
            int i_MaxParametri = CollezioneControlli.Count + 1;

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);
            int i_Result = 0;

            S_Controls.Collections.S_Object s_IdIn        = new S_Object();
            S_Controls.Collections.S_Object s_CurrentUser = new S_Object();
            S_Controls.Collections.S_Object s_IdOut       = new S_Object();
            switch (Operazione.ToString().ToUpper())
            {
            case "UPDATE":
                s_IdIn.ParameterName = "pId";
                s_IdIn.DbType        = CustomDBType.Integer;
                s_IdIn.Direction     = ParameterDirection.Input;
                s_IdIn.Index         = i_MaxParametri;
                s_IdIn.Value         = itemId;
                CollezioneControlli.Add(s_IdIn);

                s_CurrentUser.ParameterName = "pcurrentuser";
                s_CurrentUser.DbType        = CustomDBType.VarChar;
                s_CurrentUser.Direction     = ParameterDirection.Input;
                s_CurrentUser.Index         = i_MaxParametri;
                s_CurrentUser.Value         = System.Web.HttpContext.Current.User.Identity.Name;
                i_MaxParametri++;
                CollezioneControlli.Add(s_CurrentUser);


                s_IdOut.ParameterName = "pOut";
                s_IdOut.DbType        = CustomDBType.Integer;
                s_IdOut.Direction     = ParameterDirection.Output;
                s_IdOut.Index         = i_MaxParametri;
                CollezioneControlli.Add(s_IdOut);
                i_Result = _OraDl.GetRowsAffected(CollezioneControlli, "pack_enti.UpdateEnti");
                break;

            case "DELETE":

                s_IdIn.ParameterName = "pId";
                s_IdIn.DbType        = CustomDBType.Integer;
                s_IdIn.Direction     = ParameterDirection.Input;
                s_IdIn.Index         = i_MaxParametri;
                s_IdIn.Value         = itemId;
                CollezioneControlli.Add(s_IdIn);

                s_IdOut.ParameterName = "pOut";
                s_IdOut.DbType        = CustomDBType.Integer;
                s_IdOut.Direction     = ParameterDirection.Output;
                s_IdOut.Index         = i_MaxParametri;
                CollezioneControlli.Add(s_IdOut);
                i_Result = _OraDl.GetRowsAffected(CollezioneControlli, "pack_enti.DeleteEnti");
                break;

            case "INSERT":

                s_CurrentUser.ParameterName = "pcurrentuser";
                s_CurrentUser.DbType        = CustomDBType.VarChar;
                s_CurrentUser.Direction     = ParameterDirection.Input;
                s_CurrentUser.Index         = i_MaxParametri;
                s_CurrentUser.Value         = System.Web.HttpContext.Current.User.Identity.Name;
                i_MaxParametri++;
                CollezioneControlli.Add(s_CurrentUser);


                s_IdOut.ParameterName = "pOut";
                s_IdOut.DbType        = CustomDBType.Integer;
                s_IdOut.Direction     = ParameterDirection.Output;
                s_IdOut.Index         = i_MaxParametri;
                CollezioneControlli.Add(s_IdOut);
                i_Result = _OraDl.GetRowsAffected(CollezioneControlli, "pack_enti.InsertEnti");
                break;
            }
            return(i_Result);
        }
Exemplo n.º 14
0
        private void BindDt()
        {
            ApplicationDataLayer.OracleDataLayer _OraDl;
            _OraDl = new OracleDataLayer(s_ConnStr);

            S_ControlsCollection CollezioneParametri = new S_ControlsCollection();


//			S_Object pTabella=new S_Object();
//			pTabella.ParameterName = "pTabella";
//			pTabella.DbType = CustomDBType.VarChar;
//			pTabella.Direction = ParameterDirection.Input;
//			pTabella.Size = 100;
//			pTabella.Value = NomeTabella;
//			pTabella.Index=0;
//			CollezioneParametri.Add(pTabella);


            S_Object pCampo = new S_Object();

            pCampo.ParameterName = "pCampo";
            pCampo.DbType        = CustomDBType.VarChar;
            pCampo.Direction     = ParameterDirection.Input;
            pCampo.Size          = 100;
            pCampo.Value         = NomeCampo;
            pCampo.Index         = 1;
            CollezioneParametri.Add(pCampo);

            S_Object pVal = new S_Object();

            pVal.ParameterName = "pVal";
            pVal.DbType        = CustomDBType.VarChar;
            pVal.Direction     = ParameterDirection.Input;
            pVal.Size          = 100;
            pVal.Value         = Valore;
            pVal.Index         = 2;
            CollezioneParametri.Add(pVal);

            S_Object pTipo = new S_Object();

            pTipo.ParameterName = "pTipo";
            pTipo.DbType        = CustomDBType.VarChar;
            pTipo.Direction     = ParameterDirection.Input;
            pTipo.Size          = 100;
            pTipo.Value         = Tipo;
            pTipo.Index         = 3;
            CollezioneParametri.Add(pTipo);

            Hashtable _HS       = (Hashtable)Session["ParametriSelectSchema"];
            string    NomeVista = Convert.ToString(_HS["NomeVista"]);

            S_Object pNomeVista = new S_Object();

            pNomeVista.ParameterName = "pNomeVista";
            pNomeVista.DbType        = CustomDBType.VarChar;
            pNomeVista.Direction     = ParameterDirection.Input;
            pNomeVista.Size          = 100;
            pNomeVista.Value         = NomeVista;
            pNomeVista.Index         = 4;
            CollezioneParametri.Add(pNomeVista);

            S_Object s_IdIn = new S_Object();

            s_IdIn.ParameterName = "putente";
            s_IdIn.DbType        = CustomDBType.VarChar;
            s_IdIn.Direction     = ParameterDirection.Input;
            s_IdIn.Index         = 5;
            s_IdIn.Value         = System.Web.HttpContext.Current.User.Identity.Name;
            CollezioneParametri.Add(s_IdIn);

            S_Object io_cursor = new S_Object();

            io_cursor.ParameterName = "io_cursor";
            io_cursor.Direction     = ParameterDirection.Output;
            io_cursor.DbType        = ApplicationDataLayer.DBType.CustomDBType.Cursor;
            io_cursor.Index         = 6;
            CollezioneParametri.Add(io_cursor);

            DataTable dt = new DataTable();

            //Recupero i dati dal DataBase

            dt = _OraDl.GetRows(CollezioneParametri, "IL_PACK_INTERROGAZIONI.IL_SpSelectValCampo").Copy().Tables[0];

            MyDataGrid1.DataSource = dt;
            MyDataGrid1.DataBind();

            elementiTrovati = dt.Rows.Count;
        }
Exemplo n.º 15
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override DataSet GetData(S_ControlsCollection CollezioneControlli)
 {
     return(null);
 }
        private void BindApparecchiature()
        {
            int idPiano    = Convert.ToInt32(Request.QueryString["idpiano"]);
            int idEdificio = Convert.ToInt32(Request.QueryString["idbl"]);
            int IdServizio = Convert.ToInt32(Request.QueryString["IdServizio"]);

            if (Request.QueryString["descrizione"] != null)
            {
                descrizione = Request.QueryString["descrizione"].Trim();
            }

            if (Request.QueryString["idReparto"] != "")
            {
                idReparto = Convert.ToInt32(Request.QueryString["idReparto"]);
            }
            else
            {
                idReparto = 0;
            }

            if (Request.QueryString["idCategoria"] != "")
            {
                idCategoria = Convert.ToInt32(Request.QueryString["idCategoria"]);
            }
            else
            {
                idCategoria = 0;
            }

            if (Request.QueryString["idDestUso"] != "")
            {
                idDestUso = Convert.ToInt32(Request.QueryString["idDestUso"]);
            }
            else
            {
                idDestUso = 0;
            }

            if (Request.QueryString["stanzeSel"] != null)
            {
                stringaRm = Request.QueryString["stanzeSel"];
            }
            if (Request.QueryString["stdSel"] != null)
            {
                stringaStd = Request.QueryString["stdSel"];
            }

            WebCad.WiewCad.Apparecchiature _apparecchiature = new WebCad.WiewCad.Apparecchiature();

            S_ControlsCollection pippoCollezioneControlli = new S_ControlsCollection();
            S_Object             bl_id = new S_Object();

            bl_id.ParameterName = "p_bl_id";
            bl_id.DbType        = CustomDBType.Integer;
            bl_id.Direction     = ParameterDirection.Input;
            bl_id.Value         = idEdificio;
            bl_id.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(bl_id);

            S_Object fl_id = new S_Object();

            fl_id.ParameterName = "p_fl_id";
            fl_id.DbType        = CustomDBType.Integer;
            fl_id.Direction     = ParameterDirection.Input;
            fl_id.Value         = idPiano;
            fl_id.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(fl_id);

            S_Object pIdServizio = new S_Object();

            pIdServizio.ParameterName = "pIdServizio";
            pIdServizio.DbType        = CustomDBType.Integer;
            pIdServizio.Direction     = ParameterDirection.Input;
            pIdServizio.Value         = IdServizio;
            pIdServizio.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(pIdServizio);

            S_Object pdescrizione = new S_Object();

            pdescrizione.ParameterName = "p_descr";
            pdescrizione.DbType        = CustomDBType.VarChar;
            pdescrizione.Size          = 100;
            pdescrizione.Direction     = ParameterDirection.Input;
            pdescrizione.Value         = descrizione;
            pdescrizione.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(pdescrizione);

            S_Object p_cat_id = new S_Object();

            p_cat_id.ParameterName = "p_cat_id";
            p_cat_id.DbType        = CustomDBType.Integer;
            p_cat_id.Direction     = ParameterDirection.Input;
            p_cat_id.Value         = idCategoria;
            p_cat_id.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(p_cat_id);

            S_Object p_reparto_id = new S_Object();

            p_reparto_id.ParameterName = "p_reparto_id";
            p_reparto_id.DbType        = CustomDBType.Integer;
            p_reparto_id.Direction     = ParameterDirection.Input;
            p_reparto_id.Value         = idReparto;
            p_reparto_id.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(p_reparto_id);

            S_Object p_dest_uso_id = new S_Object();

            p_dest_uso_id.ParameterName = "p_dest_uso_id";
            p_dest_uso_id.DbType        = CustomDBType.Integer;
            p_dest_uso_id.Direction     = ParameterDirection.Input;
            p_dest_uso_id.Value         = idDestUso;
            p_dest_uso_id.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(p_dest_uso_id);

            S_Object p_str_stanze = new S_Object();

            p_str_stanze.ParameterName = "p_str_stanze";
            p_str_stanze.DbType        = CustomDBType.VarChar;
            p_str_stanze.Size          = 500;
            p_str_stanze.Direction     = ParameterDirection.Input;
            p_str_stanze.Value         = stringaRm;
            p_str_stanze.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(p_str_stanze);

            S_Object p_str_std = new S_Object();

            p_str_std.ParameterName = "p_str_std";
            p_str_std.DbType        = CustomDBType.VarChar;
            p_str_std.Size          = 500;
            p_str_std.Direction     = ParameterDirection.Input;
            p_str_std.Value         = stringaStd;
            p_str_std.Index         = pippoCollezioneControlli.Count + 1;
            pippoCollezioneControlli.Add(p_str_std);

            DataSet ds = _apparecchiature.GetData(pippoCollezioneControlli);

            MyDataGrid1.DataSource = ds;
            elementiTrovati        = Convert.ToString(ds.Tables[0].Rows.Count);
            MyDataGrid1.DataBind();
        }
Exemplo n.º 17
0
 public override int Delete(S_ControlsCollection CollezioneControlli, int itemId)
 {
     return(base.Delete(CollezioneControlli, itemId));
 }
Exemplo n.º 18
0
        public int ExecutePianiBuilding(string operazione, long idBl, long idPiano, decimal mQLordi, decimal mQNetti, decimal mQMura)
        {
            int result = 0;

            S_ControlsCollection _SColl = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_id = new S_Object();
            s_id.ParameterName = "p_ID_BL";
            s_id.DbType        = CustomDBType.Integer;
            s_id.Direction     = ParameterDirection.Input;
            s_id.Index         = 0;
            s_id.Value         = idBl;

            S_Controls.Collections.S_Object s_idPiano = new S_Object();
            s_idPiano.ParameterName = "p_ID_PIANO";
            s_idPiano.DbType        = CustomDBType.Integer;
            s_idPiano.Direction     = ParameterDirection.Input;
            s_idPiano.Index         = 1;
            s_idPiano.Value         = idPiano;

            S_Controls.Collections.S_Object s_lordi = new S_Object();
            s_lordi.ParameterName = "p_MQLORDI";
            s_lordi.DbType        = CustomDBType.Float;
            s_lordi.Direction     = ParameterDirection.Input;
            s_lordi.Index         = 2;
            s_lordi.Value         = mQLordi;

            S_Controls.Collections.S_Object s_netti = new S_Object();
            s_netti.ParameterName = "p_MQNETTI";
            s_netti.DbType        = CustomDBType.Float;
            s_netti.Direction     = ParameterDirection.Input;
            s_netti.Index         = 3;
            s_netti.Value         = mQNetti;

            S_Controls.Collections.S_Object s_mura = new S_Object();
            s_mura.ParameterName = "p_MQMURA";
            s_mura.DbType        = CustomDBType.Float;
            s_mura.Direction     = ParameterDirection.Input;
            s_mura.Index         = 4;
            s_mura.Value         = mQMura;


            S_Controls.Collections.S_Object s_Output = new S_Object();
            s_Output.ParameterName = "p_IdOut";
            s_Output.DbType        = CustomDBType.Integer;
            s_Output.Direction     = ParameterDirection.Output;
            s_Output.Index         = 5;

            _SColl.Add(s_id);
            _SColl.Add(s_idPiano);
            _SColl.Add(s_lordi);
            _SColl.Add(s_netti);
            _SColl.Add(s_mura);
            _SColl.Add(s_Output);

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);

            if (operazione == "update")
            {
                string s_StrSql = "PACK_BUILDINGS.SP_UPDATEPIANIBUILDING";
                return(result = _OraDl.GetRowsAffected(_SColl, s_StrSql));
            }

            if (operazione == "insert")
            {
                string s_StrSql = "PACK_BUILDINGS.SP_NEWPIANIBUILDING";
                result = _OraDl.GetRowsAffected(_SColl, s_StrSql);
                return(result);
            }

            if (operazione == "delete")
            {
                //string s_StrSql = "PACK_BUILDINGS.SP_NEWPIANIBUILDING";
                //return result = _OraDl.GetRowsAffected(_SColl, s_StrSql);
            }

            return(result);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Recupera le apparecchiature legate ad un edificio
        /// </summary>
        /// <param name="itemId">è il ID BL dell'edificio</param>
        /// <returns></returns>
        public DataSet GetApparecchiature(int itemId, int id_servizio, int id_piano, int id_stanza, int id_stapp, int id_codapp)
        {
            DataSet _Ds;
            S_ControlsCollection CollezioneControlli = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_p_id = new S_Controls.Collections.S_Object();
            s_p_id.ParameterName = "p_id";
            s_p_id.DbType        = CustomDBType.Integer;
            s_p_id.Direction     = ParameterDirection.Input;
            s_p_id.Index         = CollezioneControlli.Count + 1;
            s_p_id.Value         = itemId;
            CollezioneControlli.Add(s_p_id);

            S_Controls.Collections.S_Object s_p_id_servizio = new S_Controls.Collections.S_Object();
            s_p_id_servizio.ParameterName = "p_id_servizio";
            s_p_id_servizio.DbType        = CustomDBType.Integer;
            s_p_id_servizio.Direction     = ParameterDirection.Input;
            s_p_id_servizio.Index         = CollezioneControlli.Count + 1;
            s_p_id_servizio.Value         = id_servizio;
            CollezioneControlli.Add(s_p_id_servizio);

            S_Controls.Collections.S_Object s_p_id_piano = new S_Controls.Collections.S_Object();
            s_p_id_piano.ParameterName = "p_id_piano";
            s_p_id_piano.DbType        = CustomDBType.Integer;
            s_p_id_piano.Direction     = ParameterDirection.Input;
            s_p_id_piano.Index         = CollezioneControlli.Count + 1;
            s_p_id_piano.Value         = id_piano;
            CollezioneControlli.Add(s_p_id_piano);

            S_Controls.Collections.S_Object s_p_id_stanza = new S_Controls.Collections.S_Object();
            s_p_id_stanza.ParameterName = "p_id_stanza";
            s_p_id_stanza.DbType        = CustomDBType.Integer;
            s_p_id_stanza.Direction     = ParameterDirection.Input;
            s_p_id_stanza.Index         = CollezioneControlli.Count + 1;
            s_p_id_stanza.Value         = id_stanza;
            CollezioneControlli.Add(s_p_id_stanza);

            S_Controls.Collections.S_Object s_p_id_stapp = new S_Controls.Collections.S_Object();
            s_p_id_stapp.ParameterName = "p_id_stappar";
            s_p_id_stapp.DbType        = CustomDBType.Integer;
            s_p_id_stapp.Direction     = ParameterDirection.Input;
            s_p_id_stapp.Index         = CollezioneControlli.Count + 1;
            s_p_id_stapp.Value         = id_stapp;
            CollezioneControlli.Add(s_p_id_stapp);

            S_Controls.Collections.S_Object s_p_id_codapp = new S_Controls.Collections.S_Object();
            s_p_id_codapp.ParameterName = "p_id_codapp";
            s_p_id_codapp.DbType        = CustomDBType.Integer;
            s_p_id_codapp.Direction     = ParameterDirection.Input;
            s_p_id_codapp.Index         = CollezioneControlli.Count + 1;
            s_p_id_codapp.Value         = id_codapp;
            CollezioneControlli.Add(s_p_id_codapp);


            S_Controls.Collections.S_Object s_Cursor = new S_Object();
            s_Cursor.ParameterName = "IO_CURSOR";
            s_Cursor.DbType        = CustomDBType.Cursor;
            s_Cursor.Direction     = ParameterDirection.Output;
            s_Cursor.Index         = CollezioneControlli.Count + 1;

            CollezioneControlli.Add(s_Cursor);

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);
            string s_StrSql = "PACK_DATITECNICIAPP.SP_GETAPPARECCHIATURE";

            _Ds = _OraDl.GetRows(CollezioneControlli, s_StrSql).Copy();

            return(_Ds);
        }
Exemplo n.º 20
0
 public int AddServizi(S_ControlsCollection CollezioneControlli, int itemID)
 {
     return(this.ExecuteServizi(CollezioneControlli, ExecuteType.Insert, itemID));
 }
Exemplo n.º 21
0
        protected override int ExecuteUpdate(S_ControlsCollection CollezioneControlli, ExecuteType Operazione, int itemId)
        {
            int i_Result = 0;

            return(i_Result);
        }
Exemplo n.º 22
0
 public int AddStanze(S_ControlsCollection CollezioneControlli)
 {
     return(this.ExecuteStanze(CollezioneControlli, ExecuteType.Insert, 0));
 }
Exemplo n.º 23
0
        private void Ricerca(Classi.TipoManutenzioneType t)
        {
            Classi.AnagrafeImpianti.Apparecchiature _Richiesta = new TheSite.Classi.AnagrafeImpianti.Apparecchiature();
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_p_Wr_Id = new S_Controls.Collections.S_Object();
            s_p_Wr_Id.ParameterName = "p_Wr_Id";
            s_p_Wr_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wr_Id.Direction     = ParameterDirection.Input;
            s_p_Wr_Id.Index         = 2;
            s_p_Wr_Id.Size          = 50;
            s_p_Wr_Id.Value         = (this.txtsRichiesta.Text == "")?0:Int32.Parse(this.txtsRichiesta.Text);
            _SCollection.Add(s_p_Wr_Id);

            S_Controls.Collections.S_Object s_p_Addetto = new S_Controls.Collections.S_Object();
            s_p_Addetto.ParameterName = "p_Addetto";
            s_p_Addetto.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Addetto.Direction     = ParameterDirection.Input;
            s_p_Addetto.Index         = 3;
            s_p_Addetto.Size          = 50;
            s_p_Addetto.Value         = this.Addetti1.NomeCompleto;
            _SCollection.Add(s_p_Addetto);

            S_Controls.Collections.S_Object s_p_DataDa = new S_Controls.Collections.S_Object();
            s_p_DataDa.ParameterName = "p_DataDa";
            s_p_DataDa.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataDa.Direction     = ParameterDirection.Input;
            s_p_DataDa.Index         = 4;
            s_p_DataDa.Size          = 10;
            s_p_DataDa.Value         = (CalendarPicker1.Datazione.Text == "")? "":CalendarPicker1.Datazione.Text;
            _SCollection.Add(s_p_DataDa);

            S_Controls.Collections.S_Object s_p_DataA = new S_Controls.Collections.S_Object();
            s_p_DataA.ParameterName = "p_DataA";
            s_p_DataA.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataA.Direction     = ParameterDirection.Input;
            s_p_DataA.Index         = 5;
            s_p_DataA.Size          = 10;
            s_p_DataA.Value         = (CalendarPicker2.Datazione.Text == "")? "":CalendarPicker2.Datazione.Text;
            _SCollection.Add(s_p_DataA);

            S_Controls.Collections.S_Object s_p_Wo_Id = new S_Controls.Collections.S_Object();
            s_p_Wo_Id.ParameterName = "p_Wo_Id";
            s_p_Wo_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wo_Id.Direction     = ParameterDirection.Input;
            s_p_Wo_Id.Index         = 6;
            s_p_Wo_Id.Size          = 50;
            s_p_Wo_Id.Value         = (this.txtsOrdine.Text == "")?0:Int32.Parse(this.txtsOrdine.Text);
            _SCollection.Add(s_p_Wo_Id);

            S_Controls.Collections.S_Object s_p_Status = new S_Controls.Collections.S_Object();
            s_p_Status.ParameterName = "p_Status";
            s_p_Status.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Status.Direction     = ParameterDirection.Input;
            s_p_Status.Index         = 8;
            s_p_Status.Value         = (cmbsStatus.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsStatus.SelectedValue);
            _SCollection.Add(s_p_Status);

            S_Controls.Collections.S_Object s_p_eq = new S_Controls.Collections.S_Object();
            s_p_eq.ParameterName = "p_eq";
            s_p_eq.DbType        = CustomDBType.Integer;
            s_p_eq.Direction     = ParameterDirection.Input;
            s_p_eq.Index         = 9;
            s_p_eq.Value         = this.eq_id;
            s_p_eq.Size          = 50;
            _SCollection.Add(s_p_eq);

            S_Controls.Collections.S_Object s_TipoManutenzione = new S_Controls.Collections.S_Object();
            s_TipoManutenzione.ParameterName = "p_TipoManutenzione";
            s_TipoManutenzione.DbType        = CustomDBType.Integer;
            s_TipoManutenzione.Direction     = ParameterDirection.Input;
            s_TipoManutenzione.Index         = 10;
            s_TipoManutenzione.Size          = 4;
            s_TipoManutenzione.Value         = t;
            _SCollection.Add(s_TipoManutenzione);

            DataSet _MyDs = _Richiesta.GetSfogliaRDLEQ(_SCollection, DataGridRicerca.PageSize, DataGridRicerca.CurrentPageIndex).Copy();

            this.DataGridRicerca.DataSource = _MyDs.Tables[0];

            DataGridRicerca.Visible = true;
            GridTitle1.Visible      = true;
            if (_MyDs.Tables[0].Rows.Count == 0)
            {
                DataGridRicerca.CurrentPageIndex = 0;
                GridTitle1.DescriptionTitle      = "Nessun dato trovato.";
            }
            else
            {
                GridTitle1.DescriptionTitle = "";
                int Pagina = 0;
                if ((_MyDs.Tables[0].Rows.Count % DataGridRicerca.PageSize) > 0)
                {
                    Pagina++;
                }
                if (DataGridRicerca.PageCount != Convert.ToInt16((_MyDs.Tables[0].Rows.Count / DataGridRicerca.PageSize) + Pagina))
                {
                    DataGridRicerca.CurrentPageIndex = 0;
                }
            }

            this.DataGridRicerca.DataBind();

            this.GridTitle1.NumeroRecords = _MyDs.Tables[0].Rows.Count.ToString();

            //long tot = CalcolaTot();
            //ImpostaPagine(tot);
        }
Exemplo n.º 24
0
 public int DeleteStanze(S_ControlsCollection CollezioneControlli, int itemID)
 {
     return(this.ExecuteStanze(CollezioneControlli, ExecuteType.Delete, itemID));
 }
Exemplo n.º 25
0
        public DataSet GetWordExcel(Classi.TipoManutenzioneType t)
        {
            Classi.AnagrafeImpianti.Apparecchiature _Richiesta = new TheSite.Classi.AnagrafeImpianti.Apparecchiature();
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            S_Controls.Collections.S_Object s_p_Wr_Id = new S_Controls.Collections.S_Object();
            s_p_Wr_Id.ParameterName = "p_Wr_Id";
            s_p_Wr_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wr_Id.Direction     = ParameterDirection.Input;
            s_p_Wr_Id.Index         = 2;
            s_p_Wr_Id.Size          = 50;
            s_p_Wr_Id.Value         = (this.txtsRichiesta.Text == "")?0:Int32.Parse(this.txtsRichiesta.Text);
            _SCollection.Add(s_p_Wr_Id);

            S_Controls.Collections.S_Object s_p_Addetto = new S_Controls.Collections.S_Object();
            s_p_Addetto.ParameterName = "p_Addetto";
            s_p_Addetto.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Addetto.Direction     = ParameterDirection.Input;
            s_p_Addetto.Index         = 3;
            s_p_Addetto.Size          = 50;
            s_p_Addetto.Value         = this.Addetti1.NomeCompleto;
            _SCollection.Add(s_p_Addetto);

            S_Controls.Collections.S_Object s_p_DataDa = new S_Controls.Collections.S_Object();
            s_p_DataDa.ParameterName = "p_DataDa";
            s_p_DataDa.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataDa.Direction     = ParameterDirection.Input;
            s_p_DataDa.Index         = 4;
            s_p_DataDa.Size          = 10;
            s_p_DataDa.Value         = (CalendarPicker1.Datazione.Text == "")? "":CalendarPicker1.Datazione.Text;
            _SCollection.Add(s_p_DataDa);

            S_Controls.Collections.S_Object s_p_DataA = new S_Controls.Collections.S_Object();
            s_p_DataA.ParameterName = "p_DataA";
            s_p_DataA.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_DataA.Direction     = ParameterDirection.Input;
            s_p_DataA.Index         = 5;
            s_p_DataA.Size          = 10;
            s_p_DataA.Value         = (CalendarPicker2.Datazione.Text == "")? "":CalendarPicker2.Datazione.Text;
            _SCollection.Add(s_p_DataA);

            S_Controls.Collections.S_Object s_p_Wo_Id = new S_Controls.Collections.S_Object();
            s_p_Wo_Id.ParameterName = "p_Wo_Id";
            s_p_Wo_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Wo_Id.Direction     = ParameterDirection.Input;
            s_p_Wo_Id.Index         = 6;
            s_p_Wo_Id.Size          = 50;
            s_p_Wo_Id.Value         = (this.txtsOrdine.Text == "")?0:Int32.Parse(this.txtsOrdine.Text);
            _SCollection.Add(s_p_Wo_Id);

            S_Controls.Collections.S_Object s_p_Status = new S_Controls.Collections.S_Object();
            s_p_Status.ParameterName = "p_Status";
            s_p_Status.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Status.Direction     = ParameterDirection.Input;
            s_p_Status.Index         = 8;
            s_p_Status.Value         = (cmbsStatus.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsStatus.SelectedValue);
            _SCollection.Add(s_p_Status);


            S_Controls.Collections.S_Object s_p_eq = new S_Controls.Collections.S_Object();
            s_p_eq.ParameterName = "p_eq";
            s_p_eq.DbType        = CustomDBType.Integer;
            s_p_eq.Direction     = ParameterDirection.Input;
            s_p_eq.Index         = 9;
            s_p_eq.Value         = this.eq_id;
            s_p_eq.Size          = 50;
            _SCollection.Add(s_p_eq);

            S_Controls.Collections.S_Object s_TipoManutenzione = new S_Controls.Collections.S_Object();
            s_TipoManutenzione.ParameterName = "p_TipoManutenzione";
            s_TipoManutenzione.DbType        = CustomDBType.Integer;
            s_TipoManutenzione.Direction     = ParameterDirection.Input;
            s_TipoManutenzione.Index         = 10;
            s_TipoManutenzione.Size          = 4;
            s_TipoManutenzione.Value         = t;
            _SCollection.Add(s_TipoManutenzione);

            return(_Richiesta.GetSfogliaRDLEQ(_SCollection).Copy());
        }
Exemplo n.º 26
0
        public int EmettiRdl(int wr_id, Classi.StateType status_id, string utente, int urgenza_id, string richiedente, string descrizione, string data_pianificata, int servizio_id, int stdApparecchiatura_id, int eq_id, int trasmissione_id, int tipo_mautenzione_id, int bl_id, int addetto_id, int id_ditta)
        {
            S_ControlsCollection _SColl = new S_ControlsCollection();

            // WR_ID
            S_Controls.Collections.S_Object s_IdWR = new S_Object();
            s_IdWR.ParameterName = "p_Wr_Id";
            s_IdWR.DbType        = CustomDBType.Integer;
            s_IdWR.Direction     = ParameterDirection.Input;
            s_IdWR.Index         = 0;
            s_IdWR.Value         = wr_id;

            // STATUS_ID
            S_Controls.Collections.S_Object s_IdStatus = new S_Object();
            s_IdStatus.ParameterName = "p_stato";
            s_IdStatus.DbType        = CustomDBType.Integer;
            s_IdStatus.Direction     = ParameterDirection.Input;
            s_IdStatus.Index         = 1;
            s_IdStatus.Value         = (int)status_id;

            // UTENTE

            S_Controls.Collections.S_Object s_CurrentUser = new S_Object();
            s_CurrentUser.ParameterName = "p_CurrentUser";
            s_CurrentUser.DbType        = CustomDBType.VarChar;
            s_CurrentUser.Direction     = ParameterDirection.Input;
            s_CurrentUser.Index         = 2;
            s_CurrentUser.Value         = utente;

            // URGENZA

            S_Controls.Collections.S_Object s_Urgenza = new S_Object();
            s_Urgenza.ParameterName = "p_urgenza";
            s_Urgenza.DbType        = CustomDBType.Integer;
            s_Urgenza.Direction     = ParameterDirection.Input;
            s_Urgenza.Index         = 3;
            s_Urgenza.Value         = urgenza_id;

            // RICHIEDENTE

            S_Controls.Collections.S_Object s_Richiedente = new S_Object();
            s_Richiedente.ParameterName = "p_richiedente";
            s_Richiedente.DbType        = CustomDBType.VarChar;
            s_Richiedente.Direction     = ParameterDirection.Input;
            s_Richiedente.Index         = 4;
            s_Richiedente.Value         = richiedente;

            // DESCRIZIONE

            S_Controls.Collections.S_Object s_Descrizione = new S_Object();
            s_Descrizione.ParameterName = "p_descrizione";
            s_Descrizione.DbType        = CustomDBType.VarChar;
            s_Descrizione.Direction     = ParameterDirection.Input;
            s_Descrizione.Index         = 5;
            s_Descrizione.Size          = 4000;
            s_Descrizione.Value         = descrizione;

            // DATAPIANIFICATA

            S_Controls.Collections.S_Object s_DataP = new S_Object();
            s_DataP.ParameterName = "p_datapianificata";
            s_DataP.DbType        = CustomDBType.VarChar;
            s_DataP.Direction     = ParameterDirection.Input;
            s_DataP.Index         = 6;
            s_DataP.Size          = 30;
            s_DataP.Value         = data_pianificata;

            // SERVIZIO

            S_Controls.Collections.S_Object s_Servizio = new S_Object();
            s_Servizio.ParameterName = "p_servizio_id";
            s_Servizio.DbType        = CustomDBType.Integer;
            s_Servizio.Direction     = ParameterDirection.Input;
            s_Servizio.Index         = 7;
            s_Servizio.Value         = servizio_id;

            // TRASMISSIONE

            S_Controls.Collections.S_Object s_Trasmissione = new S_Object();
            s_Trasmissione.ParameterName = "p_trasmissione_id";
            s_Trasmissione.DbType        = CustomDBType.Integer;
            s_Trasmissione.Direction     = ParameterDirection.Input;
            s_Trasmissione.Index         = 8;
            s_Trasmissione.Value         = trasmissione_id;

            // MANUTENZIONE

            S_Controls.Collections.S_Object s_Manutenzione = new S_Object();
            s_Manutenzione.ParameterName = "p_manutenzione_id";
            s_Manutenzione.DbType        = CustomDBType.Integer;
            s_Manutenzione.Direction     = ParameterDirection.Input;
            s_Manutenzione.Index         = 9;
            s_Manutenzione.Value         = tipo_mautenzione_id;

            // BL_ID

            S_Controls.Collections.S_Object s_BL = new S_Object();
            s_BL.ParameterName = "p_bl_id";
            s_BL.DbType        = CustomDBType.Integer;
            s_BL.Direction     = ParameterDirection.Input;
            s_BL.Index         = 10;
            s_BL.Value         = bl_id;

            // ADDETTO_ID

            S_Controls.Collections.S_Object s_Addetto = new S_Object();
            s_Addetto.ParameterName = "p_addetto_id";
            s_Addetto.DbType        = CustomDBType.Integer;
            s_Addetto.Direction     = ParameterDirection.Input;
            s_Addetto.Index         = 11;
            s_Addetto.Value         = addetto_id;

            // ID_DITTA
            S_Controls.Collections.S_Object p_id_ditta = new S_Object();
            p_id_ditta.ParameterName = "p_id_ditta";
            p_id_ditta.DbType        = CustomDBType.Integer;
            p_id_ditta.Direction     = ParameterDirection.Input;
            p_id_ditta.Index         = 12;
            p_id_ditta.Value         = id_ditta;

            // STD APPARECCHIATURA
            S_Controls.Collections.S_Object p_stdApparecchiatura_id = new S_Object();
            p_stdApparecchiatura_id.ParameterName = "p_stdApparecchiatura_id";
            p_stdApparecchiatura_id.DbType        = CustomDBType.Integer;
            p_stdApparecchiatura_id.Direction     = ParameterDirection.Input;
            p_stdApparecchiatura_id.Index         = 13;
            p_stdApparecchiatura_id.Value         = stdApparecchiatura_id;

            // APPARECCHIATURA
            S_Controls.Collections.S_Object p_eq_id = new S_Object();
            p_eq_id.ParameterName = "p_eq_id";
            p_eq_id.DbType        = CustomDBType.Integer;
            p_eq_id.Direction     = ParameterDirection.Input;
            p_eq_id.Index         = 14;
            p_eq_id.Value         = eq_id;

            // OUT

            S_Controls.Collections.S_Object s_IdOut = new S_Object();
            s_IdOut.ParameterName = "p_IdOut";
            s_IdOut.DbType        = CustomDBType.Integer;
            s_IdOut.Direction     = ParameterDirection.Output;
            s_IdOut.Index         = 15;

            _SColl.Add(s_IdWR);
            _SColl.Add(s_IdStatus);
            _SColl.Add(s_CurrentUser);
            _SColl.Add(s_Urgenza);
            _SColl.Add(s_Richiedente);
            _SColl.Add(s_Descrizione);
            _SColl.Add(s_DataP);
            _SColl.Add(s_Servizio);
            _SColl.Add(s_Trasmissione);
            _SColl.Add(s_Manutenzione);
            _SColl.Add(s_BL);
            _SColl.Add(s_Addetto);
            _SColl.Add(p_id_ditta);
            _SColl.Add(p_stdApparecchiatura_id);
            _SColl.Add(p_eq_id);
            _SColl.Add(s_IdOut);

            ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr);

            int i_Result = 0;

            switch (status_id)
            {
            case Classi.StateType.EmessaInLavorazione:
                i_Result = _OraDl.GetRowsAffected(_SColl, "PACK_EMETTI_RDL.SP_EMETTI");
                break;

            case Classi.StateType.RichiestaRifiutata:
                i_Result = _OraDl.GetRowsAffected(_SColl, "PACK_EMETTI_RDL.SP_RIFIUTA");
                break;

            case Classi.StateType.RichiestaSospesa:
                i_Result = _OraDl.GetRowsAffected(_SColl, "PACK_EMETTI_RDL.SP_SOSPENDI");
                break;
            }

            return(i_Result);
        }
        private int  EseguiDataBaseManodopera(int id, Classi.ExecuteType Operazione,
                                              string descrizioneIntervento, int idManodopera, double prezzoUnitario, int oreLavorate, double prezzoTotale)
        {
            int                  i_Result     = 0;
            ClManCorrettiva      ioDati       = new ClManCorrettiva();
            S_ControlsCollection _SCollection = new S_ControlsCollection();

            int cntParametro = 0;

            S_Object pId = new S_Object();

            pId.ParameterName = "p_id";
            pId.DbType        = CustomDBType.Integer;
            pId.Direction     = ParameterDirection.Input;
            pId.Index         = cntParametro++;
            pId.Value         = id;
            _SCollection.Add(pId);

            S_Object pIdwr = new S_Object();

            pIdwr.ParameterName = "p_WrId";
            pIdwr.DbType        = CustomDBType.Integer;
            pIdwr.Direction     = ParameterDirection.Input;
            pIdwr.Index         = cntParametro++;
            pIdwr.Value         = _wrId;
            _SCollection.Add(pIdwr);

            S_Object pDescrizioneIntervento = new S_Object();

            pDescrizioneIntervento.ParameterName = "p_descrizione_Interv";
            pDescrizioneIntervento.DbType        = CustomDBType.VarChar;
            pDescrizioneIntervento.Direction     = ParameterDirection.Input;
            pDescrizioneIntervento.Index         = cntParametro++;
            if (descrizioneIntervento == String.Empty)
            {
                pDescrizioneIntervento.Value = DBNull.Value;
            }
            else
            {
                pDescrizioneIntervento.Value = descrizioneIntervento;
            }
            _SCollection.Add(pDescrizioneIntervento);

            S_Object pIdManodopera = new S_Object();

            pIdManodopera.ParameterName = "p_IdAddetto";
            pIdManodopera.DbType        = CustomDBType.Integer;
            pIdManodopera.Direction     = ParameterDirection.Input;
            pIdManodopera.Index         = cntParametro++;
            pIdManodopera.Value         = idManodopera;
            _SCollection.Add(pIdManodopera);

            S_Object pPrezzoUnitario = new S_Object();

            pPrezzoUnitario.ParameterName = "p_PrezzoUnitario";
            pPrezzoUnitario.DbType        = CustomDBType.Double;
            pPrezzoUnitario.Direction     = ParameterDirection.Input;
            pPrezzoUnitario.Index         = cntParametro++;
            pPrezzoUnitario.Value         = prezzoUnitario;
            _SCollection.Add(pPrezzoUnitario);

            S_Object pOreLavorate = new S_Object();

            pOreLavorate.ParameterName = "p_Ore_lavorate";
            pOreLavorate.DbType        = CustomDBType.Integer;
            pOreLavorate.Direction     = ParameterDirection.Input;
            pOreLavorate.Index         = cntParametro++;
            pOreLavorate.Value         = oreLavorate;
            _SCollection.Add(pOreLavorate);

            S_Object pTotale = new S_Object();

            pTotale.ParameterName = "p_Totale";
            pTotale.DbType        = CustomDBType.Double;
            pTotale.Direction     = ParameterDirection.Input;
            pTotale.Index         = cntParametro++;
            pTotale.Value         = prezzoTotale;
            _SCollection.Add(pTotale);

            i_Result = ioDati.ExecuteManodopera(_SCollection, Operazione);

            //Faccio i conti
            Classi.ManCorrettiva.ClManCorrettiva _Totale = new TheSite.Classi.ManCorrettiva.ClManCorrettiva();
            DataSet DsManodoperaCosti = _Totale.TotManodopera(Convert.ToInt32(_wrId));

            if (DsManodoperaCosti.Tables[0].Rows.Count > 0)
            {
                tot = Convert.ToDouble(DsManodoperaCosti.Tables[0].Rows[0]["totaddetto"]);              //Convert.ToDouble(DsManodoperaCosti.Tables[0].Rows[0]["totaddetto"])+;
            }
            lblTot1.Text = Convert.ToString(tot);
            //
            return(i_Result);
        }
Exemplo n.º 28
0
        private void Ricerca()
        {
            Classi.ManCorrettiva.Avvisi _Avvisi      = new Classi.ManCorrettiva.Avvisi();
            S_ControlsCollection        _SCollection = new S_ControlsCollection();

            S_Controls.Collections.S_Object p_progetto = new S_Controls.Collections.S_Object();
            p_progetto.ParameterName = "p_progetto";
            p_progetto.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            p_progetto.Direction     = ParameterDirection.Input;
            p_progetto.Index         = _SCollection.Count;
            p_progetto.Size          = 10;
            p_progetto.Value         = id_progetto;
//			if(RicercaModulo1.cmbProgetto.SelectedValue!="")
//				p_progetto.Value = Int16.Parse(RicercaModulo1.cmbProgetto.SelectedValue);
//			else
//				p_progetto.Value =0;
            _SCollection.Add(p_progetto);

            S_Controls.Collections.S_Object p_Wr_Id = new S_Controls.Collections.S_Object();
            p_Wr_Id.ParameterName = "p_Wr_Id";
            p_Wr_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            p_Wr_Id.Direction     = ParameterDirection.Input;
            p_Wr_Id.Index         = _SCollection.Count;
            p_Wr_Id.Size          = 10;
            p_Wr_Id.Value         = txtsRichiesta.Text.Trim();
            _SCollection.Add(p_Wr_Id);

            S_Controls.Collections.S_Object p_Codice_SGA = new S_Controls.Collections.S_Object();
            p_Codice_SGA.ParameterName = "p_Codice_SGA";
            p_Codice_SGA.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            p_Codice_SGA.Direction     = ParameterDirection.Input;
            p_Codice_SGA.Index         = _SCollection.Count;
            p_Codice_SGA.Size          = 10;
            p_Codice_SGA.Value         = txtSGA.Text.Trim();
            _SCollection.Add(p_Codice_SGA);

            S_Controls.Collections.S_Object s_p_Priority = new S_Controls.Collections.S_Object();
            s_p_Priority.ParameterName = "p_Priority";
            s_p_Priority.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            s_p_Priority.Direction     = ParameterDirection.Input;
            s_p_Priority.Index         = _SCollection.Count;
            s_p_Priority.Value         = (cmbsUrgenza.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsUrgenza.SelectedValue);
            _SCollection.Add(s_p_Priority);

            S_Controls.Collections.S_Object p_Sede = new S_Controls.Collections.S_Object();
            p_Sede.ParameterName = "p_Sede";
            p_Sede.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            p_Sede.Direction     = ParameterDirection.Input;
            p_Sede.Index         = _SCollection.Count;
            p_Sede.Size          = 10;
            p_Sede.Value         = txtsSede.Text.Trim();
            _SCollection.Add(p_Sede);

            S_Controls.Collections.S_Object p_percSla = new S_Controls.Collections.S_Object();
            p_percSla.ParameterName = "p_percSla";
            p_percSla.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            p_percSla.Direction     = ParameterDirection.Input;
            p_Sede.Index            = _SCollection.Count;
            p_percSla.Value         = (cmbsPerc.SelectedValue == string.Empty)? 0:Int32.Parse(cmbsPerc.SelectedValue);
            _SCollection.Add(p_percSla);

            S_Controls.Collections.S_Object s_p_Bl_Id = new S_Controls.Collections.S_Object();
            s_p_Bl_Id.ParameterName = "P_bl_id";
            s_p_Bl_Id.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            s_p_Bl_Id.Direction     = ParameterDirection.Input;
            s_p_Bl_Id.Size          = 50;
            p_Sede.Index            = _SCollection.Count;
            s_p_Bl_Id.Value         = RicercaModulo1.TxtCodice.Text;
            _SCollection.Add(s_p_Bl_Id);

            S_Controls.Collections.S_Object p_id_stato = new S_Controls.Collections.S_Object();
            p_id_stato.ParameterName = "p_id_stato";
            p_id_stato.DbType        = ApplicationDataLayer.DBType.CustomDBType.Integer;
            p_id_stato.Direction     = ParameterDirection.Input;
            p_id_stato.Index         = _SCollection.Count;
            p_id_stato.Value         = (CmbStato.SelectedValue == string.Empty)? 0:Int32.Parse(CmbStato.SelectedValue);
            _SCollection.Add(p_id_stato);

            DataSet _MyDs = _Avvisi.GetData(_SCollection).Copy();

            //DataSet _MyDs = _Avvisi.GetData().Copy();
            if (SortColum != string.Empty)
            {
                DataView dv = _MyDs.Tables[0].DefaultView;
                dv.Sort = SortColum;
                this.DataGridRicerca.DataSource = dv;
            }
            else
            {
                this.DataGridRicerca.DataSource = _MyDs.Tables[0];
            }

            DataGridRicerca.Visible = true;
            GridTitle1.Visible      = true;
            if (_MyDs.Tables[0].Rows.Count == 0)
            {
                DataGridRicerca.CurrentPageIndex = 0;
                GridTitle1.DescriptionTitle      = "Nessun dato trovato.";
                hiddenpinga.Value   = "0";
                linkRefresh.Visible = false;
            }
            else
            {
                linkRefresh.Visible         = true;
                hiddenpinga.Value           = "1";
                GridTitle1.DescriptionTitle = "";
                int Pagina = 0;
                if ((_MyDs.Tables[0].Rows.Count % DataGridRicerca.PageSize) > 0)
                {
                    Pagina++;
                }
                if (DataGridRicerca.PageCount != Convert.ToInt16((_MyDs.Tables[0].Rows.Count / DataGridRicerca.PageSize) + Pagina))
                {
                    DataGridRicerca.CurrentPageIndex = 0;
                }
            }

            this.DataGridRicerca.DataBind();

            this.GridTitle1.NumeroRecords = _MyDs.Tables[0].Rows.Count.ToString();
        }
Exemplo n.º 29
0
        public override DataSet GetData(S_ControlsCollection CollezioneControlli)
        {
            DataSet _Ds = new DataSet();

            return(_Ds);
        }
Exemplo n.º 30
0
        private void InsertCriteri(int idGlossario, string operatore, string val1, string val2)
        {
            ApplicationDataLayer.OracleDataLayer _OraDl;
            _OraDl = new OracleDataLayer(s_ConnStr);


            S_ControlsCollection param = new S_ControlsCollection();

            S_Object pIdSchema;

            pIdSchema = new S_Object();
            pIdSchema.ParameterName = "pIdSchema";
            pIdSchema.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            pIdSchema.Direction     = ParameterDirection.Input;
            pIdSchema.Value         = IdQuery == 0?NewIdQuery:IdQuery;
            pIdSchema.Index         = 0;
            pIdSchema.Size          = 32;
            param.Add(pIdSchema);

            S_Object pIdGlossario;

            pIdGlossario = new S_Object();
            pIdGlossario.ParameterName = "pIdGlossario";
            pIdGlossario.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            pIdGlossario.Direction     = ParameterDirection.Input;
            pIdGlossario.Value         = idGlossario;
            pIdGlossario.Index         = 1;
            pIdGlossario.Size          = 32;
            param.Add(pIdGlossario);

            S_Object pOperatore;

            pOperatore = new S_Object();
            pOperatore.ParameterName = "pOperatore";
            pOperatore.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            pOperatore.Direction     = ParameterDirection.Input;
            pOperatore.Value         = operatore;
            pOperatore.Index         = 2;
            pOperatore.Size          = 32;
            param.Add(pOperatore);

            S_Object pValore1;

            pValore1 = new S_Object();
            pValore1.ParameterName = "pValore1";
            pValore1.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            pValore1.Direction     = ParameterDirection.Input;
            pValore1.Value         = val1;
            pValore1.Index         = 3;
            pValore1.Size          = 32;
            param.Add(pValore1);

            S_Object pValore2;

            pValore2 = new S_Object();
            pValore2.ParameterName = "pValore2";
            pValore2.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            pValore2.Direction     = ParameterDirection.Input;
            pValore2.Value         = val2;
            pValore2.Index         = 4;
            pValore2.Size          = 32;
            param.Add(pValore2);

            S_Object DirParam;

            DirParam = new S_Object();
            DirParam.ParameterName = "pId";
            DirParam.DbType        = ApplicationDataLayer.DBType.CustomDBType.VarChar;
            DirParam.Direction     = ParameterDirection.Output;
            DirParam.Value         = DBNull.Value;
            DirParam.Index         = 5;
            DirParam.Size          = 32;
            param.Add(DirParam);

            _OraDl.ExecuteProcedure(param, "IL_PACK_INTERROGAZIONI.IL_SpInsertFiltro");
        }