override protected Boolean LoadData() { try { // Load Data For Page. DALogTableAllow daLogTableAllow = new DALogTableAllow(); daLogTableAllow.USP_LogTableAllow_GetFullID(this.KeyID); // fTableName.Value = daLogTableAllow.fTableName.ToString(); // // Khi cần enabled cột nào //if (this.KeyID > 0) //{ // if (mode != Act.Clone) // fUserName.Enabled = false; // else // fUserName.Text = ""; //} } catch (Exception e) { ShowErrorMes("Lỗi hệ thống: " + e.ToString()); return(false); } return(true); }
override protected int DeleteByID(int pID) { try { DALogTableAllow DALogTableAllow = new DALogTableAllow(); DALogTableAllow.USP_LogTableAllow_Delete(pID); return(1); } catch { return(0); } }
private DALogTableAllow CreateObjectFromPage() { // check DALogTableAllow daLogTableAllow = new DALogTableAllow(); // daLogTableAllow.fTableName = fTableName.Value.Trim(); // return(daLogTableAllow); }
override protected Boolean CheckDuplicate() { if (this.KeyID == 0) { DALogTableAllow daLogTableAllow = new DALogTableAllow(); if (daLogTableAllow.USP_LogTableAllow_CheckDuplicate(fTableName.Value) == 1) { ShowErrorMes("Bảng này đã tồn tại"); return(false); } } return(true); }
override protected int ExecUpdate() { // Update with ID = this.ID try { DALogTableAllow DALogTableAllow = CreateObjectFromPage(); DALogTableAllow.fID = this.KeyID; DALogTableAllow.USP_LogTableAllow_Update(); return(1); } catch { return(0); } }
override protected Boolean GetDataComboBox() { try { DALogTableAllow daLogTableAllow = new DALogTableAllow(); fTableName.DataSource = daLogTableAllow.USP_LogTableAllow_GetDataForComboBox(); fTableName.DataBind(); return(true); } catch (Exception ex) { ShowErrorMes("Lỗi hệ thống: " + ex.Message); return(false); } }
override protected int ExecInsert() { try { DALogTableAllow DALogTableAllow = CreateObjectFromPage(); if (this.mode == ActParam.New) { DALogTableAllow.fID = DALogTableAllow.USP_GetKey(); this.KeyID = DALogTableAllow.fID; // --> Update new SessionID for continue edit. } else { DALogTableAllow.fID = 0; } DALogTableAllow.USP_LogTableAllow_Insert(); return(1); } catch { return(0); } }