public int GetCountAffectationDocumentsByIdExchange(int iIdExchange) { affectationDocumentsCompositeType adct = new affectationDocumentsCompositeType(); AffectationDocuments ad = new AffectationDocuments(); return(ad.GetCountAffectationDocumetsByExchangeId(iIdExchange)); }
public errorCompositeType UpdateAffectationDocuments(affectationDocumentsCompositeType adct) { errorCompositeType lstError = new errorCompositeType(); try { AffectationDocuments et = new AffectationDocuments(); et.UpdateExchangeAffectationDocuments(adct); lstError.bError = true; lstError.sError = ""; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public PDFManager(int iExchange, string serverPath) { ServerPath = serverPath; ex = new ExchangeCompositeType(); adct = new affectationDocumentsCompositeType(); var em = new ExchangeManager(); ex = em.getExchangeById(iExchange); var adm = new AffectationDocumentsManager(); adct = adm.GetAffectationDocumentsByIdExchange(iExchange); var objAutorization = new TaskAutorizationManager(); dtAutorization = objAutorization.GetAll(iExchange); var objPartList = new PartListExchangeManager(); lPartList = new List <PartListExchangeCompositeType>(); lPartList = objPartList.getAllPartListExchange(iExchange); lockClose = true; }
private affectationDocumentsCompositeType Afectacion() { var adct = new affectationDocumentsCompositeType { bAMEF = chkAMEF.Checked, bCost = chkCost.Checked, bDevices = chkDevices.Checked, bDrawing = chkDrawing.Checked, bEspecifications = chkEspecification.Checked, bHOE = chkHOE.Checked, bMedia = chkMedia.Checked, bMold = chkMold.Checked, bOthers = chkOthers.Checked, bPlan = chkPlan.Checked, bSAP = chkSAP.Checked, bSingOff = chkSing.Checked, iIdExchange = int.Parse(lblIdExchange.Text.ToString()) }; return(adct); }
private void AddDocumentosAfectados() { if (ddlExchange.SelectedItem.Text.Contains("Cambio")) { var adct = new affectationDocumentsCompositeType(); var adm = new AffectationDocumentsManager(); adct.bAMEF = chkAMEF.Checked; adct.bCost = chkCost.Checked; adct.bDevices = chkDevices.Checked; adct.bDrawing = chkDrawing.Checked; adct.bEspecifications = chkEspecification.Checked; adct.bHOE = chkHOE.Checked; adct.bMedia = chkMedia.Checked; adct.bMold = chkMold.Checked; adct.bOthers = chkOthers.Checked; adct.bPlan = chkPlan.Checked; adct.bSAP = chkSAP.Checked; adct.bSingOff = chkSing.Checked; adct.iIdExchange = int.Parse(lblIdExchange.Text.ToString()); try { if (adm.GetCountAffectationDocumentsByIdExchange(adct.iIdExchange) > 0) { adm.UpdateAffectationDocuments(adct); } else { adm.AddAffectationDocuments(adct); } } catch (Exception ex) { throw new Exception(ex.Message); } } }
private void selectedExchange(int iIdExchange) { var ex = new ExchangeCompositeType(); var em = new ExchangeManager(); lblMessage.Text = string.Empty; try { ex = em.getExchangeById(iIdExchange); if (ex != null) { lblPrefolio.Text = ex.sFolioPre; lblIdExchange.Text = ex.iIdExchange.ToString(); ddlExchange.SelectedValue = ex.iIdExchangeType.ToString(); ddlPlant.SelectedValue = ex.iIdPlant.ToString(); ddlPriority.SelectedValue = ex.iIdPriority.ToString(); ddlClient.SelectedValue = ex.iIdClient.ToString(); ddlSerie.SelectedValue = ex.iSerie.ToString(); ddlEngeenerProduct_Asignacion(iIdExchange, ex.iProductEngener); txtAction.Text = ex.sMeasure; txtContact.Text = ex.sContact; txtDescription.Text = ex.sDescription; txtIssue.Text = ex.sIssue; if (ex.dLimitDate != null) { calLimite.SelectedDate = (DateTime)ex.dLimitDate; } txtLastFolio.Text = ex.sLastFolio; txtProyectPlataformDescription.Text = ex.sProyect; txtReason.Text = ex.sReason; BlockControls(); CleanControls(); if (ex.sExchangeType.ToString() == "Cambio") { pnDocuments.Visible = true; var adct = new affectationDocumentsCompositeType(); var adm = new AffectationDocumentsManager(); adct = adm.GetAffectationDocumentsByIdExchange(iIdExchange); chkAMEF.Checked = adct.bAMEF; chkCost.Checked = adct.bCost; chkDevices.Checked = adct.bDevices; chkDrawing.Checked = adct.bDrawing; chkEspecification.Checked = adct.bEspecifications; chkHOE.Checked = adct.bHOE; chkMedia.Checked = adct.bMedia; chkMold.Checked = adct.bMold; chkOthers.Checked = adct.bOthers; chkPlan.Checked = adct.bPlan; chkSAP.Checked = adct.bSAP; chkSing.Checked = adct.bSingOff; } else { pnDocuments.Visible = false; } lblPrefolio.Text = ex.sFolioPre; txtSrchPreFol.Text = ex.sFolioPre; lblPrefolio.Visible = true; lblPrefolioTitle.Visible = true; } } catch (Exception e) { throw new Exception(e.Message); } }