public void DiasExpiracionPassword(string claveCliente) { ReqDiasParaExpiracionPassword req = new ReqDiasParaExpiracionPassword(); req.claveCliente = claveCliente; Services.DiasParaExpiracionPassword(base.ServiceRequest, (_) => { if (!_.ErrorInMakingRequest) { if (_.Error.clave.Is(Errors.Generic.OK)) { if (!string.IsNullOrEmpty(_.Dto.diasParaExpiracion)) { int dias = Convert.ToInt32(_.Dto.diasParaExpiracion); if (ExpiracionPasswordComplete != null) { this._dispatcher.BeginInvoke(() => { ExpiracionPasswordComplete(dias); }); } } } } }, req); }
public static void DiasParaExpiracionPassword(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoDiasParaExpiracionPassword> asyncCallback, ReqDiasParaExpiracionPassword requestData) { #if OFFLINE serviceRequest.BeginWebRequestOffline<ResDiasParaExpiracionPassword, DtoDiasParaExpiracionPassword>(service._serviceDiasParaExpiracionPassword, asyncCallback, json._jsonDiasParaExpiracionPassword); #else new Thread(() => { serviceRequest.BeginWebRequest<ResDiasParaExpiracionPassword, DtoDiasParaExpiracionPassword, ReqDiasParaExpiracionPassword>(service._serviceDiasParaExpiracionPassword, asyncCallback, requestData); }).Start(); #endif }