private void ucUseIndependentChargeService_Load(object sender, EventArgs e) { SenderCallBack scb = new SenderCallBack(LoadData); AsyncCallback callback = new AsyncCallback(OnCompleted); scb.BeginInvoke(callback, null); }
/// <summary> /// Permite notificar que el proceso asíncrono ha terminado /// </summary> /// <param name="asyncResult">Objeto con referencia de tipo AsyncCallback</param> private void OnCompleted(IAsyncResult asyncResult) { AsyncResult result = (AsyncResult)asyncResult; SenderCallBack scb = (SenderCallBack)result.AsyncDelegate; scb.EndInvoke(asyncResult); LoadUserControl(); }
private void OnCompleted(IAsyncResult asyncResult) { AsyncResult result = (AsyncResult)asyncResult; SenderCallBack scb = (SenderCallBack)result.AsyncDelegate; scb.EndInvoke(asyncResult); ActivateCalculateChargeService(); }
private void confirmButton_Click(object sender, EventArgs e) { lblSearch.Visible = true; timer1.Enabled = true; progressBar1.Visible = true; //Plane(); SenderCallBack scb = new SenderCallBack(Plane); AsyncCallback callback = new AsyncCallback(OnCompleted); scb.BeginInvoke(callback, null); }
/// <summary> /// Carga user control de inicio /// </summary> private void LoadUserControl() { if (this.InvokeRequired) { SenderCallBack scb = new SenderCallBack(LoadUserControl); this.Invoke(scb); } else { Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } }
/// <summary> /// Valida los campos y se llama un proceso de forma asincrona /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAccept_Click(object sender, EventArgs e) { if (IsValidateBusinessRules) { timer1.Enabled = true; progressBar1.Visible = true; lblLoader.Visible = true; SenderCallBack scb = new SenderCallBack(createExcel); AsyncCallback callback = new AsyncCallback(OnCompleted); scb.BeginInvoke(callback, null); } }
private void ActivateCalculateChargeService() { if (this.InvokeRequired) { SenderCallBack scb = new SenderCallBack(ActivateCalculateChargeService); this.Invoke(scb); } else { activateFormOfPaymentCS = ParameterBL.GetParameterValue("ActivateFormOfPaymentCS"); activateOldRemarkCS = ParameterBL.GetParameterValue("ActivateOldRemarkCS"); CalculateChargeService(); } }
//Valida si el PCC es correcto y manda a llamar un poceso de forma asincrona private void btnAccept_Click(object sender, EventArgs e) { List <ListItem> CatPccsList = CatPccsBL.GetPccs(txtPCC.Text, Login.OrgId); if (CatPccsList.Count.Equals(0)) { statusValidPCC = true; } else { statusValidPCC = false; } if (IsValidateBusinessRules) { timer1.Enabled = true; progressBar1.Visible = true; lblLoader.Visible = true; SenderCallBack scb = new SenderCallBack(createExcel); AsyncCallback callback = new AsyncCallback(OnCompleted); scb.BeginInvoke(callback, null); } }