Ejemplo n.º 1
0
        public void DoIntervalSync(string connDBString)
        {
            //SqlCmdHelper help = new SqlCmdHelper() { SqlConnString = connDBString };
            string[] dbArr      = connDBString.Split(';');
            string   waitSyncDB = string.Empty;

            foreach (var item in dbArr)
            {
                if (item.Contains("Initial Catalog"))
                {
                    waitSyncDB = item.Split('=')[1].Trim();
                }
            }
            string sql  = SyncToCodeDB(10, waitSyncDB);
            string time = DateTime.Now.ToString(CommonFormat.DateTimeFormat);

            LogHelperExt.WriteLog("will Sync uin in  " + waitSyncDB + ".dbo.tecentqqdata  data,time=" + time);
            try
            {
                if (ConfigurationItems.OupputSql)
                {
                    LogHelperExt.WriteLog("will exucte sql= " + sql);
                }
                //help.ExcuteNoQuery(sql, null);
                string endTime = DateTime.Now.ToString(CommonFormat.DateTimeFormat);
                LogHelperExt.WriteLog("end Sync  uin data,time=" + endTime);
            }
            catch (Exception ex)
            {
                string endTime = DateTime.Now.ToString(CommonFormat.DateTimeFormat);
                LogHelperExt.WriteLog("Sync uin data error \r\n" + endTime + " \r\n" + ex.Message);
            }
        }
Ejemplo n.º 2
0
 private void TecentDataFrm_Load(object sender, EventArgs e)
 {
     try
     {
         InitBaseConfig();
     }
     catch (Exception ex)
     { /*
        * 未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。系统找不到指定的文件。
        */
         LogHelperExt.WriteLog(ex.ToString());
     }
 }
Ejemplo n.º 3
0
 private void QueryTodayPickUp(object data)
 {
     try
     {
         if (this.InvokeRequired)
         {
             DelegateData.BaseDelegate bd = new DelegateData.BaseDelegate(QueryTodayPickUp);
             this.Invoke(bd, data);
             return;
         }
         PickUpStatic pc = data as PickUpStatic;
         lsbStatic.Items.Clear();
         lsbStatic.Items.Add("时间戳" + DateTime.Now.ToString());
         lsbStatic.Items.Add("库\t" + pc.DBTotal);
         lsbStatic.Items.Add("库唯一\t" + pc.DBPrimaryTotal);
         lsbStatic.Items.Add("日期\t" + pc.StaticDay);
         lsbStatic.Items.Add("今日总计\t" + pc.Total);
         lsbStatic.Items.Add("今日QQ号\t" + pc.IdTotal);
     }
     catch (Exception ex)
     {
         LogHelperExt.WriteLog("Query pick up number\r\n" + ex.Message);
     }
 }