コード例 #1
0
        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);
            }
        }
コード例 #2
0
ファイル: ecoTemplateEdit.aspx.cs プロジェクト: you8/cato
        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;
            }
        }
コード例 #3
0
ファイル: uiMethods.asmx.cs プロジェクト: you8/cato
        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.");
            }
        }