}//databind /// <summary> /// 繫結資料 MST /// </summary> private void databind_Mst() { //try //{ ErrorMsgLabel.Text = ""; IFMModel.BCO.MaintainSysRequest BCO = new IFMModel.BCO.MaintainSysRequest(ConnectionDB); ParameterList.Clear(); ParameterList.Add(this.hiddenID.Value); DataTable Dt = BCO.QueryReqMainByID(ParameterList); if (Dt.Rows.Count > 0) { dt_Main = Dt; //結案 Toolbar不可有編輯 if (dt_Main.Rows[0]["REQ_STATUS"].ToString() == "75") { GMToolbar1.ButtonEnableControl(WUI_GMToolbarV.ButtonType.Edit, false, string.Empty, this.Btn_Edit, WUI_GMToolbarV.ClickAction.ButtonClick); } } else { ArrayList AL = (ArrayList)Session["IFM03_SortKey" + Request.QueryString["IFM032_PageTimeStamp"]]; string strRemove = "id=" + Request["ID"].ToString(); AL.Remove(strRemove); Session["IFM03_SortKey" + Request.QueryString["IFM032_PageTimeStamp"]] = AL; throw new Exception("查無此筆資料或已被其他使用者刪除,請點選上一筆/下一筆鈕或回查詢頁重新查詢!"); } }//databind_Mst
}//UC_RecPre private void Loaddata(string NewCode) { IFMModel.BCO.MaintainSysRequest BCO = new IFMModel.BCO.MaintainSysRequest(ConnectionDB); ParameterList.Clear(); ParameterList.Add(NewCode); DataTable Dt = BCO.QueryReqMainByID(ParameterList); if (Dt != null) { if (Dt.Rows.Count == 0) { ArrayList AL = (ArrayList)Session["IFM03_SortKey" + Request.QueryString["IFM032_PageTimeStamp"]]; string strRemove = "id=" + NewCode; AL.Remove(strRemove); Session["IFM03_SortKey" + Request.QueryString["IFM032_PageTimeStamp"]] = AL; throw new Exception("此筆資料已被其他使用者刪除,請點選上一筆/下一筆鈕或回查詢頁重新查詢!"); } } }