private void DeleteForm(int ID, string page) { if (page == "/Views/LlojiHapsires/Index.aspx") { BLL.LlojiHapsires obj = new BLL.LlojiHapsires(); obj.LlojiID = ID; LlojiHapsiresMapper objm = new LlojiHapsiresMapper(obj); objm.Delete(); } }
public void placeShenimet() { Index form = (Index)Context.Handler; int ID = form.SelectedID; ViewState["SelectedID"] = ID; BLL.LlojiHapsires ex = new BLL.LlojiHapsires(); LLojiHapsiresMapper em = new LLojiHapsiresMapper(ex); em.SelectedID(ID); LlojiTextBox.Text = ex.Lloji; }
protected void SaveButton_Click(object sender, EventArgs e) { if (LlojiTextBox.Text.Length == 0) { lblError.Visible = true; LlojiTextBox.Focus(); return; } else { int ID = Convert.ToInt32(ViewState["SelectedID"].ToString()); BLL.LlojiHapsires ex = new BLL.LlojiHapsires(); LlojiHapsiresMapper em = new LlojiHapsiresMapper(ex); em.SelectedID(ID); ex.Lloji = LlojiTextBox.Text; em.Update(); Response.Redirect("Index.aspx"); } }