public bool Save() { if (scriptIntend.GetIntend(ScriptID).Rows.Count > 0) { return(scriptIntend.Update(ScriptID, Intend)); } else { return(scriptIntend.Save(ScriptID, Intend)); } }
public ScriptIntend(string scriptID, string intend) { this.ScriptID = scriptID; scriptIntend = new Data.ScriptIntend(); if (intend == "") { DataTable dt = scriptIntend.GetIntend(ScriptID); if (dt.Rows.Count > 0) { this.Intend = dt.Rows[0]["intend"].ToString(); } } else { this.Intend = intend; } }