public frmUygulama(UygulamaBilgisi uygulama) { InitializeComponent(); lblUygID.Text = uygulama.ID.ToString(); lblUygulamaAdi.Text = uygulama.UygulamaAdi; lblUygulamaNamespace.Text = uygulama.Namespace; }
public void versiyonCek(UygulamaBilgisi uygulama) { aktifUygulama = uygulama; HttpWebRequest istek = (HttpWebRequest)WebRequest.Create(string.Format("{0}guncelleme/{1}/", ((frmAna)Parent).apiSunucuAdresi, uygulama.Namespace)); istek.Method = "GET"; try { WebResponse cevap = istek.GetResponse(); using (StreamReader okuyucu = new StreamReader(cevap.GetResponseStream(), Encoding.UTF8)) { versiyonDoldur(new JavaScriptSerializer().Deserialize <VersiyonBilgisi[]>(okuyucu.ReadToEnd())); } } catch (Exception ex) { ex.logKaydiEkle(); } }
public void versiyonAyrintisiDoldur(VersiyonBilgisi versiyon, UygulamaBilgisi uygulama) { lblUygulamaAdi.Text = uygulama.UygulamaAdi; lblNamespace.Text = uygulama.Namespace; lblVersiyon.Text = versiyon.Versiyon; lblPaketSayisi.Text = versiyon.PaketSayisi.ToString(); if (versiyon.GuncellemeDurumu == 0) { lblGuncellemeDurumu.Text = "Yayınlanmadı"; lblGuncellemeDurumu.ForeColor = Color.Red; btnYayinlaKaldir.Text = "Yayınla"; btnYayinlaKaldir.Tag = 1; } else if (versiyon.GuncellemeDurumu == 1) { lblGuncellemeDurumu.Text = "Yayınlandı"; lblGuncellemeDurumu.ForeColor = Color.Green; btnYayinlaKaldir.Text = "Yayından kaldır"; btnYayinlaKaldir.Tag = 0; } lblZorunlu.Text = versiyon.Zorunlu == 0 ? "Zorunlu değil" : "Zorunlu"; lblGuncellemeNotu.Text = versiyon.GuncellemeNotu; lblGuncellemeKodu.Text = versiyon.ID.ToString(); btnYayinlaKaldir.Visible = true; }
private void btnEkle_Click(object sender, EventArgs e) { string temelLink = string.Format("{0}{1}", kokForm.ftpSunucuAdresi, this.uygulama.Namespace); //lblDurum.Text = i.ToString() + "/" + paketler.Count(); //Klasör oluştur try { FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(temelLink); ftpRequest.Method = WebRequestMethods.Ftp.Rename; ftpRequest.Credentials = new NetworkCredential(kokForm.ftpKullaniciAdi, kokForm.ftpSifre); ftpRequest.RenameTo = txtNamespace.Text.Trim(); using (var resp = (FtpWebResponse)ftpRequest.GetResponse()) { } UygulamaBilgisi uygulama = new UygulamaBilgisi(); uygulama.Namespace = txtNamespace.Text.Trim(); uygulama.UygulamaAdi = txtUygulamaAdi.Text; uygulama.ID = this.uygulama.ID; HttpWebRequest istek = (HttpWebRequest)WebRequest.Create(string.Format("{0}uygulama/{1}", kokForm.apiSunucuAdresi, new JavaScriptSerializer().Serialize(uygulama))); istek.Method = "PATCH"; WebResponse cevap = istek.GetResponse(); using (StreamReader okuyucu = new StreamReader(cevap.GetResponseStream())) { string sonuc = okuyucu.ReadToEnd(); if (sonuc == "true") { kokForm.OnYukle(); this.Close(); } else { MessageBox.Show("Veritabanı kaydı yapılamadı."); } } } catch (Exception ex) { ex.logKaydiEkle(); MessageBox.Show("Kayıt yapılamadı."); } }
public frmUygulamaDuzenle(frmAna frm, UygulamaBilgisi uyg) { InitializeComponent(); kokForm = frm; uygulama = uyg; }