示例#1
0
        protected void imageButton_Click(Object sender, CommandEventArgs e)
        {
            ((System.Web.UI.MobileControls.Label)Form2.Controls[0].Controls[0].FindControl("lblCodEdiF2")).Text = (string)e.CommandArgument;
            string codedi = ((System.Web.UI.MobileControls.Label)Panel3.Controls[0].FindControl("lblCodEdiF2")).Text;

            //if (this.RicercaModulo1.BlId == "") return;
            Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(userName);
            ((System.Web.UI.WebControls.LinkButton)Form2.Controls[0].Controls[0].FindControl("LinkButton1")).Text = "Richieste non Emesse : " + _Richiesta.GetNumeroNonEmesse(codedi);
            ((System.Web.UI.WebControls.LinkButton)Form2.Controls[0].Controls[0].FindControl("LinkButton2")).Text = "Richieste Approvate : " + _Richiesta.GetNumeroApprovate(codedi);

            this.ActiveForm = Form2;
        }
示例#2
0
        bool RicercaNonEmesse()
        {
            string codedi = ((System.Web.UI.MobileControls.Label)Panel3.Controls[0].FindControl("lblCodEdiF2")).Text;

            //if (this.RicercaModulo1.BlId == "") return;
            Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(userName);
            DataSet _MyDs = _Richiesta.GetRDLNonEmesse(codedi);

            if (_MyDs.Tables[0].Rows.Count > 0)
            {
                DataGrid3.DataSource = _MyDs.Tables[0];
                DataGrid3.DataBind();
                return(true);
            }
            return(false);
        }
        private bool RicercaAddetti()
        {
//			string NomeCompleto = ((System.Web.UI.MobileControls.TextBox)pnlRicerca.Controls[0].FindControl("txtAddetto")).Text;
            string NomeCompleto = this.GetValue(pnlRicerca, "txtAddetto");
            string codDitta     = p_cmbsDitta.SelectedValue;
//			string cod = ((System.Web.UI.MobileControls.TextBox)pnlRicerca.Controls[0].FindControl("txtCodEdificio")).Text;
            string cod         = this.GetValue(pnlRicerca, "txtCodEdificio");
            string codEdificio = (cod == "")?"%":cod;

            Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(userName);
            DataSet Ds = _Richiesta.GetAddetti(NomeCompleto, codEdificio, codDitta);

            if (Ds.Tables[0].Rows.Count > 0)
            {
                this.p_GridAddetti.DataSource = Ds.Tables[0];
                this.p_GridAddetti.DataBind();
                return(true);
            }
            return(false);
        }
        public void load()
        {
            string       NomeCompleto  = "";     // this.txtNomeCompleto;
            string       codDitta      = this.txtDitta;
            string       cod           = this.txtEdificio;
            string       codEdificio   = (cod == "")?"%":cod;
            DropDownList pcmbsAddetti0 = (DropDownList)Panel1.Controls[0].Controls[0].FindControl("cmbsAddetti0");
            DropDownList pcmbsAddetti1 = (DropDownList)Panel1.Controls[0].Controls[0].FindControl("cmbsAddetti1");

            Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(Context.User.Identity.Name);
            DataSet Ds = _Richiesta.GetAddetti(NomeCompleto, codEdificio, codDitta);

            if (Ds.Tables[0].Rows.Count > 0)
            {
                pcmbsAddetti0.DataSource     = Ds.Tables[0];
                pcmbsAddetti0.DataTextField  = "NOMINATIVO";
                pcmbsAddetti0.DataValueField = "ID";
                pcmbsAddetti0.DataBind();
                pcmbsAddetti1.DataSource     = Ds.Tables[0];
                pcmbsAddetti1.DataTextField  = "NOMINATIVO";
                pcmbsAddetti1.DataValueField = "ID";
                pcmbsAddetti1.DataBind();
            }
        }
示例#5
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Inserire qui il codice utente necessario per inizializzare la pagina.
            if (Request.Params["ItemId"] != null)
            {
                this.p_lblOperatore      = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblOperatore"));
                this.p_lblData           = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblData"));
                this.p_lblOra            = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblOra"));
                this.p_lblRichiedente    = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblRichedente"));
                this.p_lblGruppo         = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblGruppo"));
                this.p_lblTelefono       = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblTelefono"));
                this.p_lblNota           = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblNota"));
                this.p_lblCodiceEdificio = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblCodEdificio"));
                this.p_lblDenominazione  = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblDenominazione"));
                this.p_lblDescrizione    = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblDescrizione"));
                this.p_lblUrgenza        = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblUrgenza"));
                this.p_lblServizio       = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblServizio"));
                this.p_lblEqStd          = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblStdApparacchiatura"));
                this.p_lblEqId           = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblApparacchiatura"));
                this.p_lblRDL            = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblRDL"));

                this.p_lblRDL.Text = Request.Params["ItemId"];


                itemId = Int32.Parse(Request.Params["ItemId"]);
                //itemId = 202;//Int32.Parse("162");
                //				PageTitle1.Title = "Inserimento Richiesta di Lavoro N° " + itemId ;
                //				txtWrHidden.Text= itemId.ToString();

                Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(Context.User.Identity.Name);

                DataSet _MyDs = _Richiesta.GetSingleData(itemId).Copy();

                if (_MyDs.Tables[0].Rows.Count == 1)
                {
                    DataRow  _Dr             = _MyDs.Tables[0].Rows[0];
                    DateTime d_DateRequested = (DateTime)_Dr["DATE_REQUESTED"];
                    this.p_lblData.Text = d_DateRequested.ToShortDateString();
                    DateTime d_TimeRequested = (DateTime)_Dr["TIME_REQUESTED"];
                    this.p_lblOra.Text            = d_TimeRequested.ToShortTimeString();
                    this.p_lblCodiceEdificio.Text = (string)_Dr["BL_ID"];
                    if (_Dr["DENOMINAZIONE"] != DBNull.Value)
                    {
                        this.p_lblDenominazione.Text = (string)_Dr["DENOMINAZIONE"];
                    }

                    if (_Dr["USERNAME"] != DBNull.Value)
                    {
                        this.p_lblOperatore.Text = (string)_Dr["USERNAME"];
                    }
                    if (_Dr["REQUESTOR"] != DBNull.Value)
                    {
                        this.p_lblRichiedente.Text = (string)_Dr["REQUESTOR"];
                    }
                    if (_Dr["PHONE"] != DBNull.Value)
                    {
                        this.p_lblTelefono.Text = (string)_Dr["PHONE"];
                    }
                    if (_Dr["DESCRIZIONERICHIEDENTI"] != DBNull.Value)
                    {
                        this.p_lblGruppo.Text = (string)_Dr["DESCRIZIONERICHIEDENTI"];
                    }

                    string s_Nota = string.Empty;
                    if (_Dr["NOTA_RIC"] != DBNull.Value)
                    {
                        s_Nota = (string)_Dr["NOTA_RIC"];
                    }

                    this.p_lblNota.Text = s_Nota.Replace("\n", "<br>");

                    string s_Descrizione = string.Empty;
                    if (_Dr["DESCRIPTION"] != DBNull.Value)
                    {
                        s_Descrizione = (string)_Dr["DESCRIPTION"];
                    }

                    this.p_lblDescrizione.Text = s_Descrizione.Replace("\n", "<br>");

                    if (_Dr["PRIORITY"] != DBNull.Value)
                    {
                        this.p_lblUrgenza.Text = (string)_Dr["PRIORITY"];
                    }
                    if (_Dr["DESCRIZIONESERVIZI"] != DBNull.Value)
                    {
                        this.p_lblServizio.Text = (string)_Dr["DESCRIZIONESERVIZI"];
                    }

                    string s_Eqstd = string.Empty;
                    if (_Dr["EQ_STD"] != DBNull.Value)
                    {
                        s_Eqstd = (string)_Dr["EQ_STD"];
                    }
                    if (_Dr["DESCRIZIONEEQSTD"] != DBNull.Value)
                    {
                        s_Eqstd += " " + (string)_Dr["DESCRIZIONEEQSTD"];
                    }
                    this.p_lblEqStd.Text = s_Eqstd;

                    if (_Dr["EQ_ID"] != DBNull.Value)
                    {
                        this.p_lblEqId.Text = (string)_Dr["EQ_ID"];
                    }
                }
            }
        }
示例#6
0
        private int NuovaRichiesta()
        {
            int i_WrId = 0;

            Class.ClassRichiesta _Richiesta = new Class.ClassRichiesta(userName);

            OracleParameterCollection _SColl = new OracleParameterCollection();

            OracleParameter s_BlId = new OracleParameter();

            s_BlId.ParameterName = "p_Bl_Id";
            s_BlId.OracleType    = OracleType.VarChar;
            s_BlId.Direction     = ParameterDirection.Input;
            s_BlId.Size          = 8;
            s_BlId.Value         = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblcodedi")).Text;
            _SColl.Add(s_BlId);

            OracleParameter s_p_Richiedente = new OracleParameter();

            s_p_Richiedente.ParameterName = "p_Em_Id";
            s_p_Richiedente.OracleType    = OracleType.VarChar;
            s_p_Richiedente.Direction     = ParameterDirection.Input;
            s_p_Richiedente.Size          = 50;
            s_p_Richiedente.Value         = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblRichiedenteF3")).Text;
            _SColl.Add(s_p_Richiedente);

            OracleParameter s_p_Gruppo = new OracleParameter();

            s_p_Gruppo.ParameterName = "p_Gruppo";
            s_p_Gruppo.OracleType    = OracleType.VarChar;
            s_p_Gruppo.Direction     = ParameterDirection.Input;
            DropDownList cmbsGruppo = (DropDownList)Panel1.Controls[0].FindControl("cmbsGruppo");

            s_p_Gruppo.Value = (cmbsGruppo.SelectedValue == string.Empty)? "0":cmbsGruppo.SelectedValue;
            _SColl.Add(s_p_Gruppo);

            OracleParameter s_p_Phone = new OracleParameter();

            s_p_Phone.ParameterName = "p_Phone";
            s_p_Phone.OracleType    = OracleType.VarChar;
            s_p_Phone.Direction     = ParameterDirection.Input;
            s_p_Phone.Size          = 50;
            s_p_Phone.Value         = ((System.Web.UI.MobileControls.TextBox)Panel1.Controls[0].FindControl("txtsTelefonoRichiedente")).Text;
            _SColl.Add(s_p_Phone);

            OracleParameter s_p_Nota_Ric = new OracleParameter();

            s_p_Nota_Ric.ParameterName = "p_Nota_Ric";
            s_p_Nota_Ric.OracleType    = OracleType.VarChar;
            s_p_Nota_Ric.Direction     = ParameterDirection.Input;
            s_p_Nota_Ric.Size          = 2000;
            s_p_Nota_Ric.Value         = ((System.Web.UI.MobileControls.TextBox)Panel1.Controls[0].FindControl("txtsNota")).Text;
            _SColl.Add(s_p_Nota_Ric);

            OracleParameter s_Priority = new OracleParameter();

            s_Priority.ParameterName = "p_Priority";
            s_Priority.OracleType    = OracleType.Int32;
            s_Priority.Direction     = ParameterDirection.Input;
            DropDownList cmbsPriority = (DropDownList)Panel1.Controls[0].FindControl("cmbsPriority");

            s_Priority.Value = (cmbsPriority.SelectedValue == string.Empty)? 0:Convert.ToInt32(cmbsPriority.SelectedValue);
            _SColl.Add(s_Priority);

            OracleParameter p_Description = new OracleParameter();

            p_Description.ParameterName = "p_Description";
            p_Description.OracleType    = OracleType.VarChar;
            p_Description.Direction     = ParameterDirection.Input;
            p_Description.Size          = 2000;
            p_Description.Value         = ((System.Web.UI.WebControls.TextBox)Panel1.Controls[0].FindControl("txtsProblema")).Text;
            _SColl.Add(p_Description);


            OracleParameter s_Servizio = new OracleParameter();

            s_Servizio.ParameterName = "p_Servizio_Id";
            s_Servizio.OracleType    = OracleType.Int32;
            s_Servizio.Direction     = ParameterDirection.Input;
            DropDownList cmbsServizio = (DropDownList)Panel1.Controls[0].FindControl("cmbsServizio");

            s_Servizio.Value = (cmbsServizio.SelectedValue == string.Empty)? 0:Convert.ToInt32(cmbsServizio.SelectedValue);
            _SColl.Add(s_Servizio);

            OracleParameter s_EqId = new OracleParameter();

            s_EqId.ParameterName = "p_Eq_Id";
            s_EqId.OracleType    = OracleType.Int32;
            s_EqId.Direction     = ParameterDirection.InputOutput;
            DropDownList cmbsAppare = (DropDownList)Panel1.Controls[0].FindControl("cmbsAppare");

            s_EqId.Value = (cmbsAppare.SelectedValue == string.Empty)? 0: Convert.ToInt32(cmbsAppare.SelectedValue);
            _SColl.Add(s_EqId);


            OracleParameter p_Eqstd_Id = new OracleParameter();

            p_Eqstd_Id.ParameterName = "p_Eqstd_Id";
            p_Eqstd_Id.OracleType    = OracleType.Int32;
            p_Eqstd_Id.Direction     = ParameterDirection.Input;
            DropDownList cmbsApp = (DropDownList)Panel1.Controls[0].FindControl("cmbsApp");

            p_Eqstd_Id.Value = (cmbsApp.SelectedValue == string.Empty)? 0: Convert.ToInt32(cmbsApp.SelectedValue);
            _SColl.Add(p_Eqstd_Id);


            OracleParameter p_Date_Requested = new OracleParameter();

            p_Date_Requested.ParameterName = "p_Date_Requested";
            p_Date_Requested.OracleType    = OracleType.VarChar;
            p_Date_Requested.Direction     = ParameterDirection.Input;
            p_Date_Requested.Size          = 10;
            p_Date_Requested.Value         = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblDataRichiesta")).Text;
            _SColl.Add(p_Date_Requested);

            OracleParameter p_Time_Requested = new OracleParameter();

            p_Time_Requested.ParameterName = "p_Time_Requested";
            p_Time_Requested.OracleType    = OracleType.VarChar;
            p_Time_Requested.Direction     = ParameterDirection.Input;
            p_Time_Requested.Size          = 10;
            p_Time_Requested.Value         = ((System.Web.UI.MobileControls.Label)Panel1.Controls[0].FindControl("lblOraRichiesta")).Text;
            _SColl.Add(p_Time_Requested);

            try
            {
                i_WrId = _Richiesta.Crea(_SColl);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(0);
            }
            return(i_WrId);
        }