override protected Boolean LoadData() { try { // Load Data For Page. DALogTable daLogTable = new DALogTable(); daLogTable.USP_LogTable_GetFullID(this.KeyID); DataSet ds; fTableName.Value = daLogTable.fTableName.ToString(); if (this.KeyID != 0) { //btEnale.Visible = true; //btDisable.Visible = true; Save.Visible = false; this.BtSave1 = null; fTableName.Disabled = true; ds = daLogTable.FUNC_GET_STATUS_TABLE_TRIGGER(daLogTable.fTableName); RadGrid1.DataSource = ds; RadGrid1.DataBind(); bool isEnable = false, isDisable = false; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { bool check = bool.Parse(ds.Tables[0].Rows[i]["is_visibled"].ToString()); if (!isDisable && check) { isDisable = true; } if (!isEnable && !check) { isEnable = true; } } btEnale.Visible = isEnable; btDisable.Visible = isDisable; } else { btEnale.Visible = false; btDisable.Visible = false; this.BtSave1 = Save; } } catch (Exception e) { ShowErrorMes("Lỗi hệ thống: " + e.ToString()); return(false); } return(true); }
override protected int DeleteByID(int pID) { try { // DELETE TRIGGER tData.USP_LogTable_GetFullID(pID); tData.FUNC_DELETE_LOG_FOR_TABLE(tData.fTableName); return(tData.USP_LogTable_Delete(pID)); } catch { return(0); } }