protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("del")) { string confirmValue = Request.Form["confirm_value"]; List <string> liste = confirmValue.Split(new char[] { ',' }).ToList(); int sayimiz = liste.Count - 1; string deger = liste[sayimiz]; if (deger == "Yes") { int urunID = Convert.ToInt32(e.CommandArgument); using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { ServisIslemleri s = new ServisIslemleri(dc); s.urunIptal(urunID); if (GridView3.SelectedValue != null) { string firma = KullaniciIslem.firma(); int id = Convert.ToInt32(GridView3.SelectedValue); musteriGoster(dc); UrunAra(id, dc); } } System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append(" alertify.error('Kayıt silindi!');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "EditHideModalScript3", sb.ToString(), false); } else { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append(" alertify.error('" + deger + "');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "EditHideModalScript3", sb.ToString(), false); } } }