Exemple #1
0
        private void BindStatoLavoro(string idstato)
        {
            this.cmbsstatolavoro.Items.Clear();

            TheSite.Classi.ManProgrammata.SfogliaRdlOdl _SfogliaRdlOdl = new TheSite.Classi.ManProgrammata.SfogliaRdlOdl("");

            DataSet _MyDs = _SfogliaRdlOdl.GetStatoLavoro();

            if (_MyDs.Tables[0].Rows.Count > 0)
            {
                this.cmbsstatolavoro.DataSource = Classi.GestoreDropDownList.ItemBlankDataSource(
                    _MyDs.Tables[0], "descrizione", "id", "- Tutti gli Stati -", "");
                this.cmbsstatolavoro.DataTextField  = "descrizione";
                this.cmbsstatolavoro.DataValueField = "id";
                this.cmbsstatolavoro.DataBind();

                if (idstato != "")
                {
                    try                      //TODO: questo try cach non dovrebbe esistere in quanto la funzione non dovrebbe andare in errore
                    {
                        this.cmbsstatolavoro.SelectedValue = idstato;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
            }
            else
            {
                string s_Messagggio = "- Nessuno Stato di Lavoro  -";
                this.cmbsstatolavoro.Items.Add(Classi.GestoreDropDownList.ItemMessaggio(s_Messagggio, String.Empty));
            }
        }
Exemple #2
0
        private void executeDatiGenerali()
        {
            TheSite.Classi.ManProgrammata.SfogliaRdlOdl _SfogliaRdlOdl = new TheSite.Classi.ManProgrammata.SfogliaRdlOdl(Context.User.Identity.Name);

            // WO_ID
            DataSet _Ds = _SfogliaRdlOdl.GetSingleRdl(int.Parse(wo_id));

            if (_Ds.Tables[0].Rows.Count > 0)
            {
                this.DataGrid1.DataSource = _Ds.Tables[0];
                this.DataGrid1.DataBind();
                DataGrid1.Visible = true;
            }
            else
            {
                DataGrid1.Visible = false;
            }
        }
        private void ricercadate()
        {
            TheSite.Classi.ManProgrammata.SfogliaRdlOdl _SfogliaRdlOdl = new TheSite.Classi.ManProgrammata.SfogliaRdlOdl(Context.User.Identity.Name);

            DataSet _Ds = _SfogliaRdlOdl.GetDettailSingleRdl1MANDATE(eq_id, CalendarPicker1.Datazione.Text, CalendarPicker2.Datazione.Text);

            if (_Ds.Tables[0].Rows.Count > 0)
            {
                GridTitle1.Visible           = true;
                GridTitle1.hplsNuovo.Visible = false;
                GridTitle1.NumeroRecords     = _Ds.Tables[0].Rows.Count.ToString();
                this.DataGrid2.DataSource    = _Ds.Tables[0];
                this.DataGrid2.DataBind();
                DataGrid2.Visible = true;
            }
            else
            {
                GridTitle1.Visible = false;
                DataGrid2.Visible  = false;
            }
        }
Exemple #4
0
        private void execute()
        {
            TheSite.Classi.ManProgrammata.SfogliaRdlOdl _SfogliaRdlOdl = new TheSite.Classi.ManProgrammata.SfogliaRdlOdl(Context.User.Identity.Name);

            // WO_ID
            DataSet _Ds = _SfogliaRdlOdl.GetDettailSingleRdl(int.Parse(wo_id));

            if (_Ds.Tables[0].Rows.Count > 0)
            {
                GridTitle1.Visible           = true;
                GridTitle1.hplsNuovo.Visible = false;
                GridTitle1.NumeroRecords     = _Ds.Tables[0].Rows.Count.ToString();
                this.DataGrid2.DataSource    = _Ds.Tables[0];
                this.DataGrid2.DataBind();
                DataGrid2.Visible = true;
            }
            else
            {
                GridTitle1.Visible = false;
                DataGrid2.Visible  = false;
            }
        }
Exemple #5
0
        private void Ricerca(bool reset)
        {
            S_Controls.Collections.S_ControlsCollection CollezioneControlli = new S_Controls.Collections.S_ControlsCollection();

            // Data Da
            string giornoDA = "01";
            string meseDA   = cmbsMeseDa.SelectedValue;
            string annoDA   = cmbsAnnoDa.SelectedValue;
            string dataDA   = giornoDA + "/" + meseDA + "/" + annoDA;

            S_Controls.Collections.S_Object s_P_DaData = new S_Object();
            s_P_DaData.ParameterName = "P_DaData";
            s_P_DaData.DbType        = CustomDBType.VarChar;
            s_P_DaData.Direction     = ParameterDirection.Input;
            s_P_DaData.Index         = CollezioneControlli.Count;
            s_P_DaData.Size          = 10;
            s_P_DaData.Value         = dataDA;
            CollezioneControlli.Add(s_P_DaData);

            // Data a
            string giornoA = DateTime.DaysInMonth(Int32.Parse(cmbsAnnoA.SelectedValue), Int32.Parse(cmbsMeseA.SelectedValue)).ToString();
            string meseA   = cmbsMeseA.SelectedValue;
            string annoA   = cmbsAnnoA.SelectedValue;
            string dataA   = giornoA + "/" + meseA + "/" + annoA;

            S_Controls.Collections.S_Object s_P_AData = new S_Object();
            s_P_AData.ParameterName = "P_AData";
            s_P_AData.DbType        = CustomDBType.VarChar;
            s_P_AData.Direction     = ParameterDirection.Input;
            s_P_AData.Index         = CollezioneControlli.Count;
            s_P_AData.Size          = 10;
            s_P_AData.Value         = dataA;
            CollezioneControlli.Add(s_P_AData);

            // Servizio
            S_Controls.Collections.S_Object s_P_servizio = new S_Object();
            s_P_servizio.ParameterName = "P_servizio";
            s_P_servizio.DbType        = CustomDBType.Integer;
            s_P_servizio.Direction     = ParameterDirection.Input;
            s_P_servizio.Index         = CollezioneControlli.Count;
            s_P_servizio.Size          = 10;
            s_P_servizio.Value         = (cmbsServizio.SelectedValue == "0")?0:int.Parse(cmbsServizio.SelectedValue);
            CollezioneControlli.Add(s_P_servizio);

//			// DITTA
//			S_Controls.Collections.S_Object s_P_ditta = new S_Object();
//			s_P_ditta.ParameterName = "P_ditta";
//			s_P_ditta.DbType = CustomDBType.Integer;
//			s_P_ditta.Direction = ParameterDirection.Input;
//			s_P_ditta.Index = CollezioneControlli.Count;
//			s_P_ditta.Value=(cmbsDitta.SelectedValue=="0")?0:int.Parse(cmbsDitta.SelectedValue);
//			CollezioneControlli.Add(s_P_ditta);

            // Ordine di Lavoro
            S_Controls.Collections.S_Object s_P_odl = new S_Object();
            s_P_odl.ParameterName = "P_odl";
            s_P_odl.DbType        = CustomDBType.Integer;
            s_P_odl.Direction     = ParameterDirection.Input;
            s_P_odl.Index         = CollezioneControlli.Count;
            s_P_odl.Value         = (txtOrdineLavoro.Text == "")?0:int.Parse(txtOrdineLavoro.Text);
            CollezioneControlli.Add(s_P_odl);

            // Bl codice dell'edificio
            S_Controls.Collections.S_Object s_P_bl_id = new S_Object();
            s_P_bl_id.ParameterName = "P_bl_id";
            s_P_bl_id.DbType        = CustomDBType.VarChar;
            s_P_bl_id.Direction     = ParameterDirection.Input;
            s_P_bl_id.Index         = CollezioneControlli.Count;
            s_P_bl_id.Size          = 50;
            s_P_bl_id.Value         = RicercaModulo1.TxtCodice.Text;
            CollezioneControlli.Add(s_P_bl_id);

            // Bl Descrizione dell'edificio
            S_Controls.Collections.S_Object s_P_campus = new S_Object();
            s_P_campus.ParameterName = "P_campus";
            s_P_campus.DbType        = CustomDBType.VarChar;
            s_P_campus.Direction     = ParameterDirection.Input;
            s_P_campus.Index         = CollezioneControlli.Count;
            s_P_campus.Size          = 50;
            s_P_campus.Value         = RicercaModulo1.Campus;
            CollezioneControlli.Add(s_P_campus);

            // Cognome e nome dell'addetto
//			S_Controls.Collections.S_Object s_P_addetto_id = new S_Object();
//			s_P_addetto_id.ParameterName = "P_addetto_id";
//			s_P_addetto_id.DbType = CustomDBType.VarChar;
//			s_P_addetto_id.Direction = ParameterDirection.Input;
//			s_P_addetto_id.Index =CollezioneControlli.Count;
//			s_P_addetto_id.Size=250;
//			s_P_addetto_id.Value=Addetti1.NomeCompleto;
//			CollezioneControlli.Add(s_P_addetto_id);

//			// Richiesta di Lavoro
//			S_Controls.Collections.S_Object s_P_rdl = new S_Object();
//			s_P_rdl.ParameterName = "P_rdl";
//			s_P_rdl.DbType = CustomDBType.Integer;
//			s_P_rdl.Direction = ParameterDirection.Input;
//			s_P_rdl.Index = CollezioneControlli.Count;
//			s_P_rdl.Value=(txtRichiestaLavoro.Text=="")?0:int.Parse(txtRichiestaLavoro.Text);
//			CollezioneControlli.Add(s_P_rdl);

//			// Descrizione
//			S_Controls.Collections.S_Object s_P_descrizione = new S_Object();
//			s_P_descrizione.ParameterName = "P_descrizione";
//			s_P_descrizione.DbType = CustomDBType.VarChar;
//			s_P_descrizione.Direction = ParameterDirection.Input;
//			s_P_descrizione.Index = CollezioneControlli.Count;
//			s_P_descrizione.Size=250;
//			s_P_descrizione.Value=txtDescrizione.Text;
//			CollezioneControlli.Add(s_P_descrizione);

//			// Stato della richiesta
//			S_Controls.Collections.S_Object s_P_statoric = new S_Object();
//			s_P_statoric.ParameterName = "P_statoric";
//			s_P_statoric.DbType = CustomDBType.Integer;
//			s_P_statoric.Direction = ParameterDirection.Input;
//			s_P_statoric.Index =CollezioneControlli.Count;
//			s_P_statoric.Value=(cmbsstatolavoro.SelectedValue=="")?0:int.Parse(cmbsstatolavoro.SelectedValue);
//			CollezioneControlli.Add(s_P_statoric);

            // Standard delle apparecchiature
            S_Controls.Collections.S_Object s_P_standard = new S_Object();
            s_P_standard.ParameterName = "P_standard";
            s_P_standard.DbType        = CustomDBType.Integer;
            s_P_standard.Direction     = ParameterDirection.Input;
            s_P_standard.Index         = CollezioneControlli.Count;
            s_P_standard.Value         = (cmbsStdApparecchiature.SelectedValue == "")?0:int.Parse(cmbsStdApparecchiature.SelectedValue);
            CollezioneControlli.Add(s_P_standard);

//			// Apparecchiature
            S_Controls.Collections.S_Object s_P_apparecchiatura = new S_Object();
            s_P_apparecchiatura.ParameterName = "P_apparecchiatura";
            s_P_apparecchiatura.DbType        = CustomDBType.VarChar;
            s_P_apparecchiatura.Direction     = ParameterDirection.Input;
            s_P_apparecchiatura.Size          = 50;
            s_P_apparecchiatura.Index         = CollezioneControlli.Count;
            s_P_apparecchiatura.Value         = CodiceApparecchiature1.CodiceApparecchiatura;
            CollezioneControlli.Add(s_P_apparecchiatura);



            // Stato della OdL
            S_Controls.Collections.S_Object s_P_statoOdl = new S_Object();
            s_P_statoOdl.ParameterName = "P_statoOdl";
            s_P_statoOdl.DbType        = CustomDBType.Integer;
            s_P_statoOdl.Direction     = ParameterDirection.Input;
            s_P_statoOdl.Index         = CollezioneControlli.Count;
            s_P_statoOdl.Value         = cmbsstatolavoro_odl.SelectedValue;
            CollezioneControlli.Add(s_P_statoOdl);

            S_Controls.Collections.S_Object s_p_pageindex = new S_Object();
            s_p_pageindex.ParameterName = "pageindex";
            s_p_pageindex.DbType        = CustomDBType.Integer;
            s_p_pageindex.Direction     = ParameterDirection.Input;
            s_p_pageindex.Index         = CollezioneControlli.Count;
            s_p_pageindex.Value         = DataGrid1.CurrentPageIndex + 1;
            CollezioneControlli.Add(s_p_pageindex);

            S_Controls.Collections.S_Object s_p_pagesize = new S_Object();
            s_p_pagesize.ParameterName = "pagesize";
            s_p_pagesize.DbType        = CustomDBType.Integer;
            s_p_pagesize.Direction     = ParameterDirection.Input;
            s_p_pagesize.Index         = CollezioneControlli.Count;
            s_p_pagesize.Value         = DataGrid1.PageSize;
            CollezioneControlli.Add(s_p_pagesize);

            TheSite.Classi.ManProgrammata.SfogliaRdlOdl _SfogliaRdlOdl = new TheSite.Classi.ManProgrammata.SfogliaRdlOdl(Context.User.Identity.Name);
            DataSet _Ds = _SfogliaRdlOdl.GetData(CollezioneControlli);


            if (reset == true)
            {
                CollezioneControlli.RemoveAt(CollezioneControlli.Count - 1);
                CollezioneControlli.RemoveAt(CollezioneControlli.Count - 1);
                CollezioneControlli.RemoveAt(CollezioneControlli.Count - 1);
                int _totalRecords = _SfogliaRdlOdl.GetDataCount(CollezioneControlli);
                this.GridTitle1.NumeroRecords = _totalRecords.ToString();
            }

            DataGrid1.DataSource            = _Ds.Tables[0];
            this.DataGrid1.VirtualItemCount = int.Parse(this.GridTitle1.NumeroRecords);
            this.DataGrid1.DataBind();

            if (int.Parse(GridTitle1.NumeroRecords) > 0)
            {
                this.GridTitle1.Visible = true;
                DataGrid1.Visible       = true;
            }
            else
            {
                DataGrid1.Visible       = false;
                this.GridTitle1.Visible = false;
            }
        }