예제 #1
0
    private void Databind()
    {
        DataTable dt = WOManage.Retrieve(txtBegintime.Text, txtEndtime.Text);

        if (dt.Rows.Count > 0)
        {
            GroupGrd.DataSource = dt;
            GroupGrd.DataBind();
        }
    }
예제 #2
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        string result = "";

        for (int i = 0; i <= GroupGrd.Rows.Count - 1; i++)
        {
            CheckBox cbx = (CheckBox)GroupGrd.Rows[i].FindControl("cbx");
            if (cbx.Checked == true)
            {
                //result = ManageColor.DeleteColor(UserGrd.Rows[i].Cells[1].Text, UserGrd.Rows[i].Cells[2].Text);
                result = WOManage.Delete(GroupGrd.Rows[i].Cells[1].Text);
                if (result != "success")
                {
                    JScript.Alert("删除工单失败!", this);
                }
            }
        }
        if (result == "success")
        {
            JScript.Alert("工单已成功删除!", this);
            Databind();
        }
    }