Exemplo n.º 1
0
    public static Boolean NotifyWcfSqlTest(String tableName, String action, String id, int isTest)
    {
        IWcfSystime wcfSystime = DependencyFactory.Resolve <IWcfSystime>();
        Config      config     = new Config(false, false);

        if (config.DealerInfo.NotifyWcfChangeDataBase)
        {
            String urlNotifyWcf = String.Empty;
            urlNotifyWcf = config.DealerInfo.UrlWcf;
            if (isTest == 1 && config.DealerInfo.SaveInTest)
            {
                urlNotifyWcf = config.DealerInfo.UrlWcfTest;
            }


            if (!String.IsNullOrEmpty(urlNotifyWcf))
            {
                return(wcfSystime.NotifyChangeDatabaseWcf(tableName, action, id, urlNotifyWcf));
            }
        }
        return(false);
    }
Exemplo n.º 2
0
    public static void NotifyWcfSql(String tableName, String action, String id, int isTest)
    {
        Task.Factory.StartNew(() =>
        {
            IWcfSystime wcfSystime = DependencyFactory.Resolve <IWcfSystime>();
            Config config          = new Config(false, false);
            if (config.DealerInfo.NotifyWcfChangeDataBase)
            {
                String urlNotifyWcf = config.DealerInfo.UrlWcf;
                if (isTest == 1 && config.DealerInfo.SaveInTest)
                {
                    urlNotifyWcf = config.DealerInfo.UrlWcfTest;
                }


                if (!String.IsNullOrEmpty(urlNotifyWcf))
                {
                    wcfSystime.NotifyChangeDatabaseWcf(tableName, action, id, urlNotifyWcf);
                }
            }
        });
    }