protected void btnMakine_Click(object sender, EventArgs e) { using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { ServisIslemleri s = new ServisIslemleri(dc); s.servisKararIptalR(1, User.Identity.Name); } }
protected void GridView1_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 hesapID = Convert.ToInt32(e.CommandArgument); using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { ServisIslemleri s = new ServisIslemleri(dc); s.servisKararIptalR(hesapID, User.Identity.Name); ortak(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); } } }
protected void GridView1_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 hesapID = Convert.ToInt32(e.CommandArgument); using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma())) { ServisIslemleri s = new ServisIslemleri(dc); s.servisKararIptalR(hesapID, User.Identity.Name); goster(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); } } else if (e.CommandName.Equals("onay")) { string[] arg = new string[2]; arg = e.CommandArgument.ToString().Split(';'); int hesapID = Convert.ToInt32(arg[0]); int musteriID = Convert.ToInt32(arg[2]); int index = Convert.ToInt32(arg[1]); GridViewRow row = GridView1.Rows[index]; string islem = row.Cells[2].Text; string yekun = row.Cells[8].Text; string servisid = row.Cells[12].Text; hdnHesapID.Value = hesapID.ToString(); hdnMusteriID.Value = musteriID.ToString(); hdnServisIDD.Value = servisid; hdnYekunn.Value = yekun; hdnIslemm.Value = islem; System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append("$('#onayModal').modal('show');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "OnayShowModalScript", sb.ToString(), false); } }