Esempio n. 1
0
 public void GetLinhas()
 {
     try
     {
         var get = new Class_Get_Dropdown_NPC();
         ddlBlocks.DataSource     = get.GetLinha();
         ddlBlocks.DataTextField  = "Linhas";
         ddlBlocks.DataValueField = "LinhaId";
         ddlBlocks.DataBind();
         ListItem item = new ListItem("SELECIONE A LINHA", "VALUES", true); item.Selected = true;
         ddlBlocks.Items.Add(item);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 2
0
 public void GetLocation()
 {
     try
     {
         var get = new Class_Get_Dropdown_NPC();
         ddlLocation.DataSource     = get.GetLocation();
         ddlLocation.DataTextField  = "Location";
         ddlLocation.DataValueField = "LocationId";
         ddlLocation.DataBind();
         ListItem item = new ListItem("SELECT O LOCATION", "VALUES", true); item.Selected = true;
         ddlLocation.Items.Add(item);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 3
0
 public void GetSintomas()
 {
     try
     {
         var get = new Class_Get_Dropdown_NPC();
         DdlSimtomas.DataSource     = get.GetSymtomns();
         DdlSimtomas.DataTextField  = "CodSintomas";
         DdlSimtomas.DataValueField = "SintomasId";
         DdlSimtomas.DataBind();
         ListItem item = new ListItem("SELECIONE O SINTOMA", "VALUES", true); item.Selected = true;
         DdlSimtomas.Items.Add(item);
     }
     catch (Exception ex)
     {
         lblMsgError.Text = "Erro ao listar os sintomas: " + ex.Message;
     }
 }
Esempio n. 4
0
 public void GetDefectCause()
 {
     try
     {
         var get = new Class_Get_Dropdown_NPC();
         ddlDefectCause.DataSource     = get.GetDefectCause();
         ddlDefectCause.DataTextField  = "Causa";
         ddlDefectCause.DataValueField = "CausaId";
         ddlDefectCause.DataBind();
         ListItem item = new ListItem("SELECIONE A CAUSA", "VALUES", true); item.Selected = true;
         ddlDefectCause.Items.Add(item);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 5
0
 public void GetInspProcess()
 {
     try
     {
         var get = new Class_Get_Dropdown_NPC();
         ddlInpsProcess.DataSource     = get.GetInspProcess();
         ddlInpsProcess.DataTextField  = "InspProcess";
         ddlInpsProcess.DataValueField = "ProcessID";
         ddlInpsProcess.DataBind();
         ListItem item = new ListItem("SELECIONE INSP.PROCESSO", "VALUES", true); item.Selected = true;
         ddlInpsProcess.Items.Add(item);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 6
0
        protected void lkbSearch_Click(object sender, EventArgs e)
        {
            try
            {
                string cn  = txtCn.Text;
                string cod = txtCn.Text;
                PnGlobal = txtCn.Text;
                //var listar = new GetDataEntradaRepair();
                var       listar = new Class_Get_Dropdown_NPC();
                Model_NPC mod    = listar.GetDataToInput(cod, cn);
                if (mod != null)
                {
                    txtModels.Text     = mod.Model;
                    txtPartNumber.Text = mod.PartNumbe;
                }
                else
                {
                    lblMsgError.Text = "Nenhum item encontrado para este codigo: ";
                }

                /*AQUI CHAMO O METODO PARA REGISTRAR OS DADOS QUE VEM DE MAIN LINE NO BANCO SQL LOGO APOS A PESQUISA DOS MESMO*/
                InsertInputRepairOfMainlin();
                /*FIM */


                var           RetunCod = new GetDataEntradaRepair();
                SeacherRepair modCod   = RetunCod.GetCodRegisterNPC(cod, cn);
                if (modCod != null)
                {
                    lblCodEntrada.Text = Convert.ToString(modCod.EntradaId);
                }
            }
            catch (Exception ex)
            {
                Panel1.Visible   = true;
                lblMsgError.Text = "Error to the search: " + ex.Message;
            }



            try
            {
                titleLista.Visible = true;
                string pn        = txtCn.Text;
                var    listaGrid = new GetDataEntradaRepair();
                GrdLista.DataSource = listaGrid.GetAllDataPerPartnumber(PnGlobal);
                GrdLista.DataBind();
                if (GrdLista.Rows.Count < 1)
                {
                    Panel1.Visible   = true;
                    lblMsgError.Text = "Nenhum item encontrado, pois não há entrada registrada. ";
                }


                Entrada mod = listaGrid.CountRegisterEntrada(PnGlobal);//AQUI FAZ CONTAGEM DOS REGISTROS
                if (mod != null)
                {
                    lblCount.InnerText = "Total de Reparos: " + mod.Serial;
                }
                else
                {
                    lblCount.InnerText = "Nenhum item encontrado: " + mod.Serial;
                }
            }
            catch (Exception ex)
            {
                Panel1.Visible   = true;
                lblMsgError.Text = "Nenhuma entrada encontrada: " + ex.Message;
            }
        }