private bool GetDetails(ref string sErr) { try { Ecotemplate et = new Ecotemplate(sEcoTemplateID); if (et != null) { txtEcoTemplateName.Text = et.Name; txtDescription.Text = et.Description; //the header lblEcoTemplateHeader.Text = et.Name; return(true); } else { return(false); } } catch (Exception ex) { sErr = ex.Message; return(false); } }
private bool GetDetails(ref string sErr) { try { Ecotemplate et = new Ecotemplate(sEcoTemplateID); if (et != null) { txtEcoTemplateName.Text = et.Name; txtDescription.Text = et.Description; //the header lblEcoTemplateHeader.Text = et.Name; return true; } else { return false; } } catch (Exception ex) { sErr = ex.Message; return false; } }
public string wmCopyEcotemplate(string sEcoTemplateID, string sNewName) { //have to instantiate one just to copy it :-( //grr, but that overhead won't happen too often. string sErr = ""; Ecotemplate et = new Ecotemplate(sEcoTemplateID); if (et != null) { if (!et.DBCopy(sNewName, ref sErr)) return sErr; //returning the ID indicates success... return et.ID; } else { throw new Exception("Unable to get Template [" + sEcoTemplateID + "] to copy."); } }