private void BindData() { DataTable dtCases = new d.CaseData().GetAllCasesByUser(getUserId()); cblCases.DataSource = dtCases; cblCases.DataTextField = "externalref"; cblCases.DataValueField = "Id"; cblCases.DataCheckField = "Selected"; cblCases.DataBind(); }
protected override int SaveItem() { int caseId = new d.CaseData().Create(tbxNumber.Text.Trim(), tbxDescription.Text.Trim(), Identity.UserId); if (caseId < 0) { valUnique.IsValid = false; return(0); } return(1); }
private void BindData() { DataTable dtCases = new d.CaseData().GetRecords(dgrCases.SortExpression); if (dtCases.Rows.Count > 0) { pnlGrid.Visible = true; dgrCases.Prefix = LinkPrefix; dgrCases.DataSource = dtCases; dgrCases.DataBind(); } else { pnlGrid.Visible = false; } }
private void btnDelete_Click(object sender, EventArgs e) { d.CaseData cd = new d.CaseData(); cd.Delete(Convert.ToInt32(Request["Id"])); Response.Redirect("caseList.aspx"); }