override protected Boolean LoadData() { try { // Load Data For Page. DAShortCutType daShortCutType = new DAShortCutType(); daShortCutType.USP_ShortCutType_GetFullID(this.KeyID); // fShortCutType.Value = daShortCutType.fShortCutType.ToString(); fDescription.Value = daShortCutType.fDescription.ToString(); fHTMLDefault.Value = daShortCutType.fHTMLDefault.ToString(); fActive.Checked = daShortCutType.fActive; // // 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 Boolean GetDataComboBox() { DAShortCutType daShortCutType = new DAShortCutType(); sShortCutTypeID.DataSource = daShortCutType.USP_ShortCutType_GetDataForComboBox(); sShortCutTypeID.DataBind(); return(true); }
override protected int DeleteByID(int pID) { try { DAShortCutType DAShortCutType = new DAShortCutType(); DAShortCutType.USP_ShortCutType_Delete(pID); return(1); } catch { return(0); } }
override protected int ExecUpdate() { // Update with ID = this.ID try { DAShortCutType DAShortCutType = CreateObjectFromPage(); DAShortCutType.fID = this.KeyID; DAShortCutType.USP_ShortCutType_Update(); return(1); } catch { return(0); } }
private DAShortCutType CreateObjectFromPage() { // check DAShortCutType daShortCutType = new DAShortCutType(); // daShortCutType.fShortCutType = fShortCutType.Value.Trim(); daShortCutType.fDescription = fDescription.Value.Trim(); daShortCutType.fHTMLDefault = fHTMLDefault.Value.Trim(); daShortCutType.fActive = fActive.Checked; // return(daShortCutType); }
override protected Boolean GetDataComboBox() { try { DAShortCutType daShortCutType = new DAShortCutType(); fShortCutTypeID.DataSource = daShortCutType.USP_ShortCutType_GetDataForComboBox(); fShortCutTypeID.DataBind(); return(true); } catch (Exception ex) { ShowErrorMes("Lỗi hệ thống: " + ex.Message); return(false); } }
override protected int ExecInsert() { try { DAShortCutType DAShortCutType = CreateObjectFromPage(); if (this.mode == ActParam.New) { DAShortCutType.fID = DAShortCutType.USP_GetKey(); this.KeyID = DAShortCutType.fID; // --> Update new SessionID for continue edit. } else { DAShortCutType.fID = 0; } DAShortCutType.USP_ShortCutType_Insert(); return(1); } catch { return(0); } }