override protected Boolean LoadData() { try { // Load Data For Page. DAWebFunction daWebFunction = new DAWebFunction(); daWebFunction.USP_WebFunction_GetFullID(this.KeyID); // fFuncID.Value = daWebFunction.fFuncID.ToString(); fParentID.Value = daWebFunction.fParentID.ToString(); fVNName.Value = daWebFunction.fVNName.ToString(); fENName.Value = daWebFunction.fENName.ToString(); fUKey.Value = daWebFunction.fUKey.ToString(); fUControl.Value = daWebFunction.fUControl.ToString(); fURLLink.Value = daWebFunction.fURLLink.ToString(); fRole.Value = daWebFunction.fRole.ToString(); fCssClass.Value = daWebFunction.fCssClass.ToString(); fIcon.Value = daWebFunction.fIcon.ToString(); fIconHover.Value = daWebFunction.fIconHover.ToString(); fActive.Checked = daWebFunction.fActive; fDisplayOrder.Value = daWebFunction.fDisplayOrder.ToString(); fisShow.Checked = daWebFunction.fisShow; return(true); } catch (Exception e) { ShowErrorMes("Lổi hệ thống: " + e.ToString()); return(false); } }
private DAWebFunction CreateObjectFromPage(SQL_MODE sqlMode) { // check DAWebFunction daWebFunction = new DAWebFunction(); //if (sqlMode == SQL_MODE.Insert) // daWebFunction.USP_WebFunction_GetFullID(0); // daWebFunction.fFuncID = Convert.ToInt32(fFuncID.Value.Trim()); daWebFunction.fParentID = Convert.ToInt32(fParentID.Value.Trim()); daWebFunction.fVNName = fVNName.Value.Trim(); daWebFunction.fENName = fENName.Value.Trim(); daWebFunction.fUKey = fUKey.Value.Trim(); daWebFunction.fUControl = fUControl.Value.Trim(); daWebFunction.fURLLink = fURLLink.Value.Trim(); daWebFunction.fRole = Convert.ToInt32(fRole.Value.Trim()); daWebFunction.fCssClass = fCssClass.Value.Trim(); daWebFunction.fIcon = fIcon.Value.Trim(); daWebFunction.fIconHover = fIconHover.Value.Trim(); daWebFunction.fActive = fActive.Checked; daWebFunction.fDisplayOrder = Convert.ToInt32(fDisplayOrder.Value.Trim()); daWebFunction.fisShow = fisShow.Checked; // return(daWebFunction); }
override protected int DeleteByID(int pID) { try { DAWebFunction daWebFunction = new DAWebFunction(); daWebFunction.USP_WebFunction_Delete(pID); return(1); } catch { return(0); } }
override protected int DeleteByID(int pID) { DAWebFunction tData = new DAWebFunction(); try { return(tData.USP_WebFunction_Delete(pID)); } catch { return(-1); } }
override protected int ExecUpdate() { // Update with ID = this.ID try { DAWebFunction daWebFunction = CreateObjectFromPage(SQL_MODE.Update); daWebFunction.fFuncID = this.KeyID; daWebFunction.USP_WebFunction_Update(); return(1); } catch { return(0); } }
override protected Boolean GetDataComboBox() { try { DAWebFunction daWebFunction = new DAWebFunction(); fParentID.DataSource = daWebFunction.USP_WebFunction_GetDataForComboBox_Parent(); fParentID.DataBind(); return(true); } catch (Exception e) { ShowErrorMes("Lỗi hệ thống: " + e.ToString()); return(false); } }
override protected int ExecInsert() { // Update with ID = this.ID try { DAWebFunction daWebFunction = CreateObjectFromPage(SQL_MODE.Insert); //daWebFunction.fFuncID = daWebFunction.USP_GetKey(); daWebFunction.USP_WebFunction_Insert(); if (this.mode == ActParam.New) { this.KeyID = daWebFunction.fFuncID; } return(1); } catch { return(0); } }
override protected Boolean LoadData() { try { DAWebFunction tData = new DAWebFunction(); rtl.DataSource = tData.USP_WebFunction_GetAll(0, 0); rtl.DataBind(); rtl.ExpandAllItems(); return(true); } catch (Exception e) { ShowErrorMes("Lổi hệ thống: " + e.ToString()); return(false); }; }
protected void rtl_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e) { DAWebFunction tData = new DAWebFunction(); rtl.DataSource = tData.USP_WebFunction_GetAll(0, 0); }