protected override void OnPreRender(EventArgs e) { if (loadFlag) { if (dbContentCommentID > 0) { obj = new DbContentComment(dbContentCommentID); text = "Edit - " + obj.ToString(); } else if (dbContentCommentID <= 0) { obj = new DbContentComment(); text = "Add "; } // // Set Field Entries // ltCreateDate.Text = obj.CreateDate.ToString(); ltModifyDate.Text = obj.ModifyDate.ToString(); tbName.Text = obj.Name; tbEmail.Text = obj.Email; tbUrl.Text = obj.Url; tbIP.Text = obj.IP; tbBody.Text = obj.Body; } }
protected void btOk_Click(object sender, EventArgs e) { DbContentComment dbContentComment = new DbContentComment(dbContentCommentID); dbContentComment.Delete(); dbContentCommentID = 0; OnDeleted(EventArgs.Empty); }
protected override void OnPreRender(EventArgs e) { if (dbContentCommentID != 0) { dbContentComment = new DbContentComment(dbContentCommentID); text = "Delete - " + dbContentComment.ToString(); } else { text = "Delete "; } EnsureWindowScripts(); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (dbContentCommentID != 0) { dbContentComment = new DbContentComment(dbContentCommentID); text = "Delete - " + dbContentComment.ToString(); } else { text = "Delete "; } }
protected void ok_Click(object sender, EventArgs e) { if (dbContentCommentID == 0) { obj = new DbContentComment(); } else { obj = new DbContentComment(dbContentCommentID); } obj.Name = tbName.Text; obj.Email = tbEmail.Text; obj.Url = tbUrl.Text; obj.IP = tbIP.Text; obj.Body = tbBody.Text; if (editOnAdd) { dbContentCommentID = obj.Save(); } else { obj.Save(); } if (resetOnAdd) { tbName.Text = string.Empty; tbEmail.Text = string.Empty; tbUrl.Text = string.Empty; tbIP.Text = string.Empty; tbBody.Text = string.Empty; } OnUpdated(EventArgs.Empty); }
protected override void OnPreRender(EventArgs e) { if (dbContentCommentID != 0) { dbContentComment = new DbContentComment(dbContentCommentID); #region Bind _system Folder // // Set Field Entries // ltCreateDate.Text = dbContentComment.CreateDate.ToString(); ltModifyDate.Text = dbContentComment.ModifyDate.ToString(); #endregion #region Bind New Folder Folder // // Set Field Entries // ltName.Text = dbContentComment.Name.ToString(); ltEmail.Text = dbContentComment.Email.ToString(); ltUrl.Text = dbContentComment.Url.ToString(); ltIP.Text = dbContentComment.IP.ToString(); ltBody.Text = dbContentComment.Body.ToString(); #endregion text = "View - " + dbContentComment.ToString(); } }
protected override void OnPreRender(EventArgs e) { if (dbContentCommentID != 0 & loadFlag) { editDbContentComment = new DbContentComment(dbContentCommentID); // // Set Field Entries // ltCreateDate.Text = editDbContentComment.CreateDate.ToString(); ltModifyDate.Text = editDbContentComment.ModifyDate.ToString(); tbName.Text = editDbContentComment.Name; tbEmail.Text = editDbContentComment.Email; tbUrl.Text = editDbContentComment.Url; tbIP.Text = editDbContentComment.IP; tbBody.Text = editDbContentComment.Body; text = "Edit - " + editDbContentComment.ToString(); } else { text = "Add "; } }