/// <summary>
        /// ESTE ABAIXO MOSTRA A INFORMAÇAÕ NO FORMULARIO DE REPARO FEITO PELO TECNICO.
        /// ESTACIA DA CLASS LISTADEPLACAPARAREPAROOQC - METODO: MOSTRARDADOSPARAREPAIR
        /// </summary>
        //public void MostrarDadosParaReparo()
        //{
        //    try
        //    {
        //        string objCod = lblCodigo.Text;
        //        var objLista = new ListaDePlacaParaReparoOQC();
        //        Pesquisas objModel = objLista.MostrarDadosRepaiMan(objCod);
        //        if(objModel!=null)
        //        {
        //            lblUn.Text = objModel.UN;
        //            lblCN.Text = objModel.CN;
        //            lblCausa.Text = objModel.Causa;
        //            lblPartNumber.Text = objModel.Causa;
        //            lblLote.Text = objModel.Lote;
        //            lblLocation.Text = objModel.Location;
        //        }
        //    }
        //    catch (Exception ex)
        //    {

        //        ErrorMessageRepairMan.Text = "Erro ao listar : " + ex.Message;
        //    }
        //}
        protected void btnSalvar_Click(object sender, EventArgs e)
        {
            var objModel = new SeacherRepair();

            objModel.EntradaId    = Convert.ToInt32(lblEntrada.Text);
            objModel.RepairMainId = Convert.ToInt32(lblCodigo.Text);
            objModel.ActionRepair = Convert.ToString(ddlAction.SelectedItem.Text);
            objModel.UserName     = Convert.ToString(ddlSendRepair.SelectedValue);
            var updateAction = new ListaDePlacaParaReparoOQC();

            updateAction.UpdateRepairManAction(objModel);
            updateAction.UpdateTecnicoAfterActionRepairMan(objModel);
            updateAction.UpdateStatusFinalAfterActionRepairMan(objModel);
            ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Registro feito com sucesso!');", true);
            ListaPlacaParaReparo();
        }
Beispiel #2
0
 protected void btnSalvar_Click(object sender, EventArgs e)
 {
     if (ddlSendRepair.SelectedItem.Text != "ALL")
     {
         var objModel = new SeacherRepair();
         objModel.EntradaId    = Convert.ToInt32(lblEntrada.Text);
         objModel.RepairMainId = Convert.ToInt32(lblCodigo.Text);
         objModel.ActionRepair = Convert.ToString(ddlAction.SelectedItem.Text);
         objModel.UserName     = Convert.ToString(ddlSendRepair.SelectedValue);
         var updateAction = new ListaDePlacaParaReparoOQC();
         updateAction.UpdateRepairManAction(objModel);
         updateAction.UpdateTecnicoAfterActionRepairMan(objModel);
         updateAction.UpdateStatusFinalAfterActionRepairMan(objModel);
         /*******/
         string UserLagado = HttpContext.Current.User.Identity.GetUserId();
         var    objMod     = new SeacherRepair();
         objMod.EntradaId = Convert.ToInt32(lblCodigo.Text);
         objMod.UserName  = UserLagado;
         updateAction.UpdateRepairMan(objMod);
         /*FIM*/
         ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Registro feito com sucesso!');", true);
         ListaPlacaParaReparo();
     }
     else if (ddlSendRepair.SelectedItem.Text == "ALL")
     {
         var objModel = new SeacherRepair();
         objModel.EntradaId    = Convert.ToInt32(lblEntrada.Text);
         objModel.RepairMainId = Convert.ToInt32(lblCodigo.Text);
         objModel.ActionRepair = Convert.ToString(ddlAction.SelectedItem.Text);
         objModel.UserName     = Convert.ToString(ddlSendRepair.SelectedValue);
         var updateAction = new ListaDePlacaParaReparoOQC();
         updateAction.UpdateRepairManAction(objModel);
         updateAction.UpdateTecnicoAfterActionRepairManNULL(objModel);
         updateAction.UpdateStatusFinalAfterActionRepairMan(objModel);
         /*******/
         string UserLagado = HttpContext.Current.User.Identity.GetUserId();
         var    objMod     = new SeacherRepair();
         objMod.EntradaId = Convert.ToInt32(lblCodigo.Text);
         objMod.UserName  = UserLagado;
         updateAction.UpdateRepairMan(objMod);
         /*FIM*/
         ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Registro feito com sucesso!');", true);
         ListaPlacaParaReparo();
     }
 }