public static WriteBackWfm GetInstance()
        {
            WriteBackWfm wfm;

            System.Web.Caching.Cache cache = HttpRuntime.Cache;
            object o = cache["FCWriteBackWfm"];

            if (o == null)
            {
                string path            = ConfigurationManager.AppSettings["FCWriteBackWfm_Address"].ToString();
                WriteBackXMLOperate op = new WriteBackXMLOperate();
                wfm = op.Xml2Model(path);
                cache.Insert("FCWriteBackWfm", wfm);
            }
            else
            {
                wfm = (WriteBackWfm)o;
            }
            return(wfm);
        }
Exemple #2
0
 public ReceiptFlow()
 {
     try
     {
         System.Web.Caching.Cache cache = HttpRuntime.Cache;
         object o = cache["FCWriteBackWfm"];
         if (o == null)
         {
             string path            = ConfigurationManager.AppSettings["FCWriteBackWfm_Address"].ToString();
             WriteBackXMLOperate op = new WriteBackXMLOperate();
             wfm = op.Xml2Model(path);
             cache.Insert("FCWriteBackWfm", wfm);
         }
         else
         {
             wfm = (WriteBackWfm)o;
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }