Пример #1
0
    private void Loaddata(string NewCode)
    {
        SYSModel.MaintainUser BCO = new SYSModel.MaintainUser(ConnectionDB);
        ParameterList.Clear();
        ParameterList.Add(NewCode);
        DataTable Dt = BCO.QueryUserByID(ParameterList);

        if (Dt != null)
        {
            if (Dt.Rows.Count == 0)
            {
                ArrayList AL = (ArrayList)Session["SYS04_SortKey" + Request.QueryString["SYS042_PageTimeStamp"]];

                string strRemove = "id=" + NewCode;
                AL.Remove(strRemove);
                Session["SYS04_SortKey" + Request.QueryString["SYS042_PageTimeStamp"]] = AL;

                throw new Exception("此筆資料已被其他使用者刪除,請點選上一筆/下一筆鈕或回查詢頁重新查詢!");
            }
        }
    }