private async void RemoveFromBlackListAsync(long id) { CommonHelper.ShowProgressBar(context); var model = new userdetails { BlockUserID = id }; var result = await new SettingService().PostUnBlockUserInterest(model); if (result.Status == 1) { ChatConversationRepository.UpdateBlock(id, false); CommonHelper.DismissProgressBar(context); Toast.MakeText(context, result.Message, ToastLength.Long).Show(); } else { CommonHelper.DismissProgressBar(context); Toast.MakeText(context, result.Message, ToastLength.Long).Show(); } CommonHelper.DismissProgressBar(context); }
public async void BlockContact(long id) { BTProgressHUD.Show("Block Contact", maskType: ProgressHUD.MaskType.Black); var model = new userdetails { BlockUserID = id }; var result = await new SettingService().PostBlockUserInterest(model); if (result.Status == 1) { lblBlockUser.Text = "UnBlock"; ChatConversationRepository.UpdateBlock(contactViewModel.ChatConvId); BTProgressHUD.Dismiss(); new UIAlertView("Block Contact", result.Message, null, "OK", null).Show(); } else { BTProgressHUD.Dismiss(); new UIAlertView("Block Contact", result.Message, null, "OK", null).Show(); } BTProgressHUD.Dismiss(); }
private async Task RemoveFromBlackListAsync(long id) { try { BTProgressHUD.Show("UnBlocked Contacts", maskType: ProgressHUD.MaskType.Black); var model = new userdetails { BlockUserID = id }; var result = await new SettingService().PostUnBlockUserInterest(model); if (result.Status == 1) { ChatConversationRepository.UpdateUnBlock(chatConversation.ChatId); new UIAlertView("Blocked Contacts", result.Message, null, "OK", null).Show(); BTProgressHUD.Dismiss(); } else { new UIAlertView("Blocked Contacts", result.Message, null, "OK", null).Show(); BTProgressHUD.Dismiss(); } BTProgressHUD.Dismiss(); } catch (Exception ex) { Crashes.TrackError(ex); BTProgressHUD.Dismiss(); } }
public virtual async Task Final(IDialogContext context, IAwaitable <string> Password) { password = await Password; userdetails user = new userdetails() { Username = username, FullName = fullName, Address = address, Mobile = mobile, Home = home, DateOfBirth = dateOfBirth, Email = email, Password = password }; var message = $"Thanks {fullName}!\n\nYour account is now being created.\n\nPlease wait a few moments as this may take a while..."; await context.PostAsync(message); await AzureManager.AzureManagerInstance.PostUser(user); message = $"Account Details\n\nUsername: {username}\n\nName: {fullName}\n\nAddress: {address}\n\nMobile Phone: {mobile}\n\nHome Phone: {home}\n\nDate of Birth: {dateOfBirth.ToString("dd-MM-yyyy")}\n\nEmail: {email}"; await context.PostAsync(message); await context.PostAsync("Thank you for registering with Contoso Bank.\n\nYou can now log in by entering: 'login' and following the steps."); context.Done(this); }
public virtual bool CheckLogin() { foreach (userdetails u in userList) { if ((u.Username == username) && (u.Password == password)) { user = u; return(true); } } return(false); }
public static string GetSchedulesProperties(string UserID) { userdetails Propertyobj = new userdetails(); Propertyobj.UserID = UserID; var javaScriptSerializer = new JavaScriptSerializer(); string strjson = javaScriptSerializer.Serialize(Propertyobj); Uri urlTemplate = new Uri(ConfigurationManager.AppSettings["ServerAddress"].ToString() + "/GetScheduledProperty"); var client = new HttpClient(); client.BaseAddress = urlTemplate; client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json; charset=utf-8"); client.Timeout = TimeSpan.FromMilliseconds(600000); StringContent htpcontent = new StringContent(strjson, Encoding.UTF8, "application/json"); var response = client.PostAsync("", htpcontent).Result; string resultContent = response.Content.ReadAsStringAsync().Result; return(resultContent); }
public async Task <InpowerResult> PostUnBlockUserInterest(userdetails BlockUser) { InpowerResult resp = null; try { resp = await _helper.Post(BlockUser, GlobalConstant.SettingUrls.postUnBlockUserUrl); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Interst"; CR.Eventname = "InetrestService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async void BlockContact(long id) { CommonHelper.ShowProgressBar(this); var model = new userdetails { BlockUserID = id }; var result = await new SettingService().PostBlockUserInterest(model); if (result.Status == 1) { txtBlockContact.Text = "UnBlock"; ChatConversationRepository.UpdateBlock(ContactObject.ChatConvId, true); CommonHelper.DismissProgressBar(this); Toast.MakeText(this, result.Message, ToastLength.Long).Show(); } else { CommonHelper.DismissProgressBar(this); Toast.MakeText(this, result.Message, ToastLength.Long).Show(); } CommonHelper.DismissProgressBar(this); }
public ManageAccountDialog(string AccountDetail) { accountdetail = AccountDetail; user = LuisDialog.user; }
public async Task StartAsync(IDialogContext context) { user = LuisDialog.user; context.Wait(AskLogout); }
public async Task DeleteUser(userdetails user) { await this.userTable.DeleteAsync(user); }
public async Task UpdateUser(userdetails user) { await this.userTable.UpdateAsync(user); }
public async Task PostUser(userdetails user) { await this.userTable.InsertAsync(user); }