public ActionResult DeleteProject([FromBody] Proje model) { bool result = _projeService.Delete(model); return(Json(result)); }
public ActionResult Projeler(Proje propj) { var proje = db.Projes.ToList(); return(View(proje)); }
public ActionResult EditProject([FromBody] Proje model) { Proje result = _projeService.First(model); return(Json(result)); }
public void Guncelle(Proje entity) { _projeDal.Guncelle(entity); }
public void Sil(Proje entity) { _projeDal.Sil(entity); }
public async Task <IActionResult> SaveAndList(int?id, Proje Proje) { await Save(id, Proje); return(RedirectToAction(nameof(CastList), new { id = Proje.GuidId })); }
public void setProje(Proje projeEntity) { this.projeEntity = projeEntity; }
public void ProjeSil(Proje p) { _projeDataAccessLayer.Delete(p); }
public void setProje(Proje Entity) { this.Entity = Entity; }
public void ProjeEkle(Proje p) { _projeDataAccessLayer.Add(p); }
public void ProjeGuncelle(Proje p) { _projeDataAccessLayer.Update(p); }
public List <ProjeSahiplik> searchInProjeSahiplik(bool beginInsDatePicker, bool beginEndDatePicker, bool beginApproveDatePicker, bool finishInsDatePicker, bool finishEndDatePicker, bool finishApproveDatePicker, int selectedState, ProjeSahiplik pSBegin, ProjeSahiplik pSEnd, Proje pEntity, Kullanici kEntity) { IDbCommand cmd = this.CreateCommand(""); string whereEkle = ""; string where = ""; whereEkle += checkSelectedDates(beginInsDatePicker, beginEndDatePicker, beginApproveDatePicker, finishInsDatePicker, finishEndDatePicker, finishApproveDatePicker, cmd, pSBegin, pSEnd); whereEkle += checkSelectedStates(selectedState, cmd, pSBegin, pSEnd); whereEkle += getFromTxtField(cmd, pEntity, kEntity); where += whereEkle; string query = ""; query = "Select pS.Id as [Id], p.Adi as [ProjeAdi], k.Adi as [StajyerAdi], pS.Versiyon as [Versiyon], k.Id as [StajyerId]," + " p.Id as [ProjeId], pS.Active,pS.InsDate, pS.EndDate, pS.ApproveDate, pS.Path " + " from dbo.Kullanici k " + "inner join dbo.ProjeSahiplik pS on pS.StajyerId = k.Id " + "inner join dbo.Proje p on p.Id = pS.ProjeId "; query += where; cmd.CommandText = query; return(SelectCompact(cmd).ToList()); }
public IActionResult Goruntule(int id) { Proje proje = db.Projeler.Where(x => x.ID == id).Include(x => x.Stajyerler).ThenInclude(x => x.Stajyer).ThenInclude(x => x.Profil).Include(x => x.BirimKoordinatorleri).ThenInclude(x => x.BirimKoordinatoru).ThenInclude(x => x.Profil).SingleOrDefault(); return(View(proje)); }
public async Task <JsonResult> ProjeCek(int id) { Proje proje = await db.Projeler.FindAsync(id); return(Json(proje)); }
public JsonResult ModifyProject(Proje proje, HttpPostedFileBase file) { return(Json(AddModifyParameters(proje, file, "ProjeDegistir"))); }
public ProjeEditDto() { Proje = new Proje(); Proje.ProjeKarakterleri = new List <ProjeKarakter>(); }
public int AddModifyParameters(Proje proje, HttpPostedFileBase file, string procedureName) { byte[] teklifIcerigi = null; string fileName = ""; if (file != null) { MemoryStream memoryStream = new MemoryStream(); file.InputStream.CopyTo(memoryStream); teklifIcerigi = memoryStream.ToArray(); fileName = file.FileName; } else { teklifIcerigi = new byte[0]; } string connString = ConfigurationManager.ConnectionStrings["MatriksStajCRM"].ConnectionString; SqlConnection connection = new SqlConnection(connString); SqlCommand command = new SqlCommand { Connection = connection, CommandType = System.Data.CommandType.StoredProcedure, CommandText = procedureName }; command.Parameters.Add(new SqlParameter("@KullaniciID", Session["ID"])); if (procedureName == "ProjeDegistir") { command.Parameters.Add(new SqlParameter("@ProjeID", proje.ProjeID)); } command.Parameters.Add(new SqlParameter("@FirmaAdi", proje.FirmaAdi)); command.Parameters.Add(new SqlParameter("@ProjeAdi", proje.ProjeAdi)); command.Parameters.Add(new SqlParameter("@ProjeYeri", proje.ProjeYeri)); DateTime TeklifTarihi = DateTime.Parse(proje.TeklifTarihi); command.Parameters.Add(new SqlParameter("@TeklifTarihi", TeklifTarihi)); command.Parameters.Add(new SqlParameter("@IcerikAdi", fileName)); command.Parameters.Add(new SqlParameter("@TeklifIcerigi", teklifIcerigi)); command.Parameters.Add(new SqlParameter("@ProjeDurum", proje.ProjeDurum)); command.Parameters.Add(new SqlParameter("@Bolum", proje.Bolum)); if (procedureName == "ProjeDegistir") { connection.Open(); int effectedRows = command.ExecuteNonQuery(); if (effectedRows != 0) { return(effectedRows); } } if (procedureName == "AddProject") { connection.Open(); SqlDataReader reader = command.ExecuteReader(); if (reader.HasRows) { reader.Read(); int projeId = reader.GetInt32(0); connection.Close(); return(projeId); } } return(0); }
public void Ekle(Proje entity) { _projeDal.Ekle(entity); }
public async Task <IActionResult> Edit(int?id, Proje Proje) { try { if (Proje.ProjeKarakterleri.IsNotNull()) { for (int i = Proje.ProjeKarakterleri.Count - 1; i >= 0; i--) { if (Proje.ProjeKarakterleri[i].ProjeKarakterOyunculari.IsNull() || Proje.ProjeKarakterleri[i].ProjeKarakterOyunculari.Count == 0) { Proje.ProjeKarakterleri.Remove(Proje.ProjeKarakterleri[i]); } else { //ModelState.Remove($"Proje.ProjeKarakterleri[{i}]"); for (int oyuncuIndex = 0; oyuncuIndex < Proje.ProjeKarakterleri[i].ProjeKarakterOyunculari.Count; oyuncuIndex++) { //Proje.ProjeKarakterleri[i].ProjeKarakterOyunculari[0].Oyuncu.Kisi.Uyruk.Id ModelState.Remove($"Proje.ProjeKarakterleri[{i}]"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Id"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].OyuncuId"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Id"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.EkleyenId"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.EklemeZamani"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.GuncelleyenId"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.GuncellemeZamani"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Aktif"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Id"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Adi"); ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Soyadi"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.EkleyenId"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.EklemeZamani"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.GuncelleyenId"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.GuncellemeZamani"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Aktif"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.Id"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.Adi"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.Soyadi"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.EkleyenId"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.EklemeZamani"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.GuncelleyenId"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.GuncellemeZamani"); //ModelState.Remove($"Proje.ProjeKarakterleri[{i}].ProjeKarakterOyunculari[{oyuncuIndex}].Oyuncu.Kisi.Uyruk.Aktif"); } } } } //ModelState.MaxAllowedErrors = 10000; //foreach (var key in ModelState.Keys) // if (key.Split('.').Length > 2) // ModelState[key].Errors.Clear(); //if (ModelState.IsValid) //{ await Save(id, Proje); return(RedirectToAction(nameof(Index), new { id = Proje.MusteriId })); //} //else //{ // foreach (var item in ModelState.Values) // { // if (item.ValidationState == Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState.Invalid) // { // foreach (var err in item.Errors) // { // MesajHelper.HataEkle(ViewBag, err.ErrorMessage); // } // } // } // MesajHelper.HataEkle(ViewBag, ModelState); //} } catch (Exception ex) { MesajHelper.HataEkle(ViewBag, ex.Message); } ProjeEditDto projeEditDto = await _ProjeServis.GetEditDtoAsync(id, Proje.MusteriId); projeEditDto.Proje = Proje; return(View(projeEditDto)); }
public ActionResult Done(Proje p) { p = CurrentSession.kullanici.secilenProje; return(View("Done", p.Todo.Where(x => x.taslakDurum == false && x.todoDurumu == todoDurum.DONE).OrderByDescending(x => x.guncellemeTarihi).ToList())); }