Exemple #1
0
        public static int GetSystemProfile_Int(string name, ReportCommon.ModuleID moduleId)
        {
            try
            {
                string ret = GetSystemProfile_String(name, moduleId);

                if (ret != null && (ret = ret.Trim()).Length > 0)
                {
                    return(System.Convert.ToInt32(ret));
                }
            }
            catch (Exception)
            {
                System.Diagnostics.Debug.Assert(false);
            }

            return(0);
        }
Exemple #2
0
        public static bool GetSystemProfile_Bool(string name, ReportCommon.ModuleID moduleId)
        {
            try
            {
                string ret = GetSystemProfile_String(name, moduleId);

                if (ret != null && (ret = ret.Trim().ToUpper()).Length > 0)
                {
                    //return System.Convert.ToBoolean(ret);
                    return(ret == "1" || ret == "Y" || ret == "TRUE");
                }
            }
            catch (Exception)
            {
                System.Diagnostics.Debug.Assert(false);
            }

            return(false);
        }
Exemple #3
0
 public static string GetSystemProfile_String(string name, ReportCommon.ModuleID moduleId)
 {
     return(ServerCommon.DaoInstanceFactory.GetInstance().GetSystemProfileValue
                (name, ReportCommon.ReportCommon.GetMoudleIDString(moduleId)));
 }