示例#1
0
        private void BindData()
        {
            DataTable dtCases = new d.CaseData().GetAllCasesByUser(getUserId());

            cblCases.DataSource     = dtCases;
            cblCases.DataTextField  = "externalref";
            cblCases.DataValueField = "Id";
            cblCases.DataCheckField = "Selected";
            cblCases.DataBind();
        }
示例#2
0
        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);
        }
示例#3
0
        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;
            }
        }
示例#4
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     d.CaseData cd = new d.CaseData();
     cd.Delete(Convert.ToInt32(Request["Id"]));
     Response.Redirect("caseList.aspx");
 }