private bool m_blnUpdateOldData() { string strContent = txtNew.Text.Trim(); if (string.IsNullOrEmpty(strContent)) { return(false); } if (txtNew.Tag == null) { return(false); } EntityElementTemplateContent vo = new EntityElementTemplateContent(); vo.colContent = strContent; vo.serNo = Function.Dec(txtNew.Tag.ToString()); ProxyEntityFactory proxy = new ProxyEntityFactory(); int intResult = proxy.Service.UpdateByPk(vo); if (intResult > 0) { DialogBox.Msg("保存成功!"); m_mthRefresh(); return(true); } else { DialogBox.Msg("保存失败."); return(false); } }
private bool m_blnDelData() { if (clstElement.SelectedItem != null) { int serno_int = Convert.ToInt32(clstElement.SelectedValue); EntityElementTemplateContent vo = new EntityElementTemplateContent(); vo.status = 0; vo.serNo = Function.Dec(clstElement.SelectedValue); ProxyEntityFactory proxy = new ProxyEntityFactory(); int intResult = proxy.Service.UpdateByPk(vo); proxy = null; if (intResult > 0) { DialogBox.Msg("删除成功"); return(true); } else { DialogBox.Msg("删除失败"); return(false); } } return(false); }
private bool m_blnSaveNewData() { string strContent = txtNew.Text.Trim(); if (string.IsNullOrEmpty(strContent)) { return(false); } EntityElementTemplateContent objNewContent = new EntityElementTemplateContent(); objNewContent.status = 1; objNewContent.elementId = Convert.ToInt32(this.ctlPopupSelect.Value.ToString()); objNewContent.colContent = strContent; ProxyEntityFactory proxy = new ProxyEntityFactory(); int intResult = proxy.Service.Insert(objNewContent); proxy = null; if (intResult > 0) { DialogBox.Msg("保存成功!"); m_mthRefresh(); return(true); } else { DialogBox.Msg("保存失败."); return(false); } }