private void showCallPanel(bool p) { if (p) { btnLogin.Visible = false; callPanel.Visible = true; // Expire olan token refreshlenince tetiklenecek method Authentication.Token.RefreshCallback += TokensRefreshed; List <Announcement> announcements = BulutfonApi.GetAnnouncements(Authentication.Token); announcementCombo.DataSource = announcements; announcementCombo.DisplayMember = "name"; announcementCombo.ValueMember = "id"; List <Did> dids = BulutfonApi.GetDids(Authentication.Token); didCombo.DataSource = dids; didCombo.DisplayMember = "number"; didCombo.ValueMember = "number"; } else { MessageBox.Show("Bir Hata Oluştu!"); } }
public ActionResult OutgoingFaxes() { var faxes = BulutfonApi.GetFaxes((Token)Session[Token.Key]); Token x = (Token)Session[Token.Key]; x.RefreshAccessToken(); return(View(faxes)); }
private void button2_Click(object sender, EventArgs e) { // With Master Token button1.Enabled = false; button2.Enabled = false; Token token = new Token("MASTER TOKEN", ""); dataGridView1.DataSource = BulutfonApi.GetDids(token); }
public ActionResult UploadFax(OutgoingFaxForm outgoingFax) { if (outgoingFax.attachment != null && outgoingFax.attachment.ContentLength > 0) { /*var ret =*/ BulutfonApi.SendFax((Token)Session[Token.Key], outgoingFax.attachment, // faks dosyası outgoingFax.receivers, // alıcılar outgoingFax.did, // gönderen numara outgoingFax.title); // başlık // TODO: ret nesnesi üzerinden her bir alıcıya ait gönderme durumu raporlanabilir } return(RedirectToAction("OutgoingFaxes")); }
private void button1_Click(object sender, EventArgs e) { // With OAUTH 2 string client_id = "CLIENT_ID"; string client_secret = "CLIENT_SECRET"; var loggedIn = LoginForm.Login( client_id, client_secret, this); if (loggedIn) { button1.Enabled = false; button2.Enabled = false; dataGridView1.DataSource = BulutfonApi.GetDids(Authentication.Token); } }
private void makeCallButton_Click(object sender, EventArgs e) { string title = txtTitle.Text.ToString(); long did = Convert.ToInt64(didCombo.SelectedValue.ToString()); string receivers = txtReceivers.Text.ToString(); int announcement_id = Convert.ToInt32(announcementCombo.SelectedValue.ToString()); AutomaticCallCreator auto = new AutomaticCallCreator(); auto.title = title; auto.did = did; auto.receivers = receivers; auto.announcement_id = announcement_id; ResponseAutomaticCall response = BulutfonApi.CreateAutomaticCall(Authentication.Token, auto); if (response.message != null) { txtTitle.Clear(); txtReceivers.Clear(); MessageBox.Show(response.message); } }
public ActionResult OutgoingFax(string id) { var fax = BulutfonApi.GetFax((Token)Session[Token.Key], id); return(View(fax)); }
public ActionResult IncomingFaxes() { var faxes = BulutfonApi.GetIncomingFaxes((Token)Session[Token.Key]); return(View(faxes)); }
public ActionResult Dids() { var dids = BulutfonApi.GetDids((Token)Session[Token.Key]); return(View(dids)); }
public ActionResult Did(string id) { var did = BulutfonApi.GetDid((Token)Session[Token.Key], id); return(View(did)); }
public ActionResult SendSms(RequestSendMessage message) { BulutfonApi.SendSms((Token)Session[Token.Key], message); return(RedirectToAction("Messages")); }
public ActionResult Message(string id) { var message = BulutfonApi.GetMessage((Token)Session[Token.Key], id); return(View(message)); }
public ActionResult Messages() { var messages = BulutfonApi.GetMessages((Token)Session[Token.Key]); return(View(messages)); }