void CreateCalander() { //DersProgramiBaseActivityHelper.SecilenTarih = DateTime.Now; WebService webService = new WebService(); DERS_PROGRAMI dERS_PROGRAMI = new DERS_PROGRAMI() { date = UzakSunucuDenemeDTO1.startDate.ToString("yyyy-MM-dd'T'HH:mm:ssZ"), description = "", trialId = UzakSunucuDenemeDTO1.id, userId = DataBase.MEMBER_DATA_GETIR()[0].id, }; string jsonString = JsonConvert.SerializeObject(dERS_PROGRAMI); var Donus = webService.ServisIslem("calendars", jsonString); if (Donus != "Hata") { UzakSunucuTakvimDTO1 = Newtonsoft.Json.JsonConvert.DeserializeObject<UzakSunucuTakvimDTO>(Donus.ToString()); var Icerik = Newtonsoft.Json.JsonConvert.DeserializeObject<DERS_PROGRAMI>(Donus.ToString()); if (Icerik != null) { DataBase.DERS_PROGRAMI_EKLE(Icerik); DersProgramiBaseActivityHelper.DersProgramiBaseActivity1.IcerikleriOlustur(); AlertHelper.AlertGoster("Ders Programı Oluşturuldu", this.Activity); DenemeyeKatilButton.Text = "BAŞVURU ONAYLANDI"; DenemeyeKatilButton.Enabled = false; return; } } }
void CreateCalander(string TestID) { //DersProgramiBaseActivityHelper.SecilenTarih = DateTime.Now; WebService webService = new WebService(); var saat = TestSaatiText.Text.Split(":"); var OlusanTarih = new DateTime(DersProgramiBaseActivityHelper.SecilenTarih.Year, DersProgramiBaseActivityHelper.SecilenTarih.Month, DersProgramiBaseActivityHelper.SecilenTarih.Day, Convert.ToInt32(saat[0]), Convert.ToInt32(saat[1]), 0); DERS_PROGRAMI dERS_PROGRAMI = new DERS_PROGRAMI() { date = OlusanTarih.ToString("yyyy-MM-dd'T'HH:mm:ssZ"), description = TestAciklamasiText.Text.Trim(), testId = TestID, userId = DataBase.MEMBER_DATA_GETIR()[0].id, }; string jsonString = JsonConvert.SerializeObject(dERS_PROGRAMI); var Donus = webService.ServisIslem("calendars", jsonString); if (Donus != "Hata") { var Icerik = Newtonsoft.Json.JsonConvert.DeserializeObject <DERS_PROGRAMI>(Donus.ToString()); if (Icerik != null) { DataBase.DERS_PROGRAMI_EKLE(Icerik); AlertHelper.AlertGoster("Ders Programı Oluşturuldu", this); this.Finish(); return; } } }