Пример #1
0
        public static bool InsertCrawlerRestartLog(SqlHelper dbHelper, string xlogMessage, Int32 xCrawlerSeq, Int32 xCrawlerMonitorSeq
            , Int32 xChannelSeq, Int32 xAuthoritySeq, string xIssueDate)
        {
            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xlogMessage", xlogMessage);
                argdic.Add("xCrawlerSeq", xCrawlerSeq.ToString());
                argdic.Add("xCrawlerMonitorSeq", xCrawlerMonitorSeq.ToString());
                argdic.Add("xChannelSeq", xChannelSeq.ToString());
                argdic.Add("xAuthoritySeq", xAuthoritySeq.ToString());
                argdic.Add("xIssueDate", xIssueDate);

                MySqlDataReader datareader = dbHelper.call_proc("spNewCrawlerInsertLog", argdic);

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                return false;
            }

            return true;
        }
Пример #2
0
        public static bool InsertCrawlerMonitorInfo(SqlHelper dbHelper, string xIpAddress, Int32 xPort, ref Int32 MonitorSeq)
        {
            MonitorSeq = 0;

            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xIpAddress", xIpAddress);
                argdic.Add("xPort", xPort.ToString());

                MySqlDataReader datareader = dbHelper.call_proc("spNewInsertCrawlerMonitor", argdic);
                while (datareader.Read())
                {
                    MonitorSeq = Convert.ToInt32(datareader["MonitorSeq"]);
                    break;
                }

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                return false;
            }

            if (MonitorSeq == 0)
                return false;

            return true;
        }
Пример #3
0
    // 크롤러 모니터 삭제
    public static bool DeleteCrawlerMonitorInfo(SqlHelper dbHelper, Int32 xMonitorSeq)
    {
        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xMonitorSeq", xMonitorSeq);

            MySqlDataReader datareader = dbHelper.call_proc("spNewDeleteCrawlerMonitorInfo", argdic);

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #4
0
        public static bool Update_CancelOrderInfo(SqlHelper dbHelper, Int32 xOrderSeq, string xChannelOrderCode)
        {
            bool bResult = true;

            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xOrderSeq", xOrderSeq);
                argdic.Add("xChannelOrderCode", xChannelOrderCode);

                MySqlDataReader datareader = dbHelper.call_proc("sp_update_OrderCancel", argdic);

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(ex.Message);
                bResult = false;
            }

            return bResult;
        }
Пример #5
0
    // 권리사 로그인 정보 로딩
    public static bool GetAuthorityLoginList(SqlHelper dbHelper)
    {
        try
        {
            AuthorityLoginManager.Instance.InitList();
            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectAuthorityLogin", null);

            Int32 ComboBoxIndex = 1;
            while (datareader.Read())
            {
                AuthorityLoginInfoData pAuthorityLoginInfoData = new AuthorityLoginInfoData();

                if (datareader["seq"] != DBNull.Value)
                    pAuthorityLoginInfoData.seq_ = Convert.ToInt32(datareader["seq"]);

                if (datareader["ChannelSeq"] != DBNull.Value)
                    pAuthorityLoginInfoData.ChannelSeq_ = Convert.ToInt32(datareader["ChannelSeq"]);

                if (datareader["ChannelName"] != DBNull.Value)
                    pAuthorityLoginInfoData.ChannelName_ = Convert.ToString(datareader["ChannelName"]);

                if (datareader["PartnerSeq"] != DBNull.Value)
                    pAuthorityLoginInfoData.PartnerSeq_ = Convert.ToInt32(datareader["PartnerSeq"]);

                if (datareader["AuthorityName"] != DBNull.Value)
                    pAuthorityLoginInfoData.AuthorityName_ = Convert.ToString(datareader["AuthorityName"]);

                if (datareader["Name"] != DBNull.Value)
                    pAuthorityLoginInfoData.Name_ = Convert.ToString(datareader["Name"]);

                pAuthorityLoginInfoData.ComboIndex_ = ComboBoxIndex++;

                AuthorityLoginManager.Instance.GetList().Add(pAuthorityLoginInfoData.seq_, pAuthorityLoginInfoData);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #6
0
    public static bool Select_tblOrder_With_UID(SqlHelper dbHelper, Int32 xchannelSeq, Int32 xGoodsSeq
       , /*string sDate, string eDate,*/ref Dictionary<string, COrderData> pList)
    {
        bool bResult = true;

        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xChannelSeq", xchannelSeq);
            //argdic.Add("xAuthorityLoginSeq", xGoodsSeq);
            argdic.Add("xGoodsSeq", xGoodsSeq);

            //argdic.Add("xSDate", sDate);
            //argdic.Add("xEDate", eDate);

            //\MySqlDataReader datareader = dbHelper.call_proc("spNewTestSelectOrderInfo", argdic);
            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectOrderInfo", argdic);

            while (datareader.Read())
            {
                COrderData pOrderData = new COrderData();
                pOrderData.seq_ = Convert.ToInt64(datareader["seq"]);
                pOrderData.goodsSeq_ = Convert.ToInt32(datareader["goodsSeq"]);
                pOrderData.memberSeq_ = Convert.ToInt32(datareader["memberSeq"]);
                pOrderData.channelSeq_ = Convert.ToInt32(datareader["channelSeq"]);

                pOrderData.channelOrderCode_ = Convert.ToString(datareader["channelOrderCode"]);
                pOrderData.orderReserveCode_ = Convert.ToString(datareader["orderCode"]);
                pOrderData.orderID_          = Convert.ToString(datareader["orderId"]);
                pOrderData.goodsCode_        = Convert.ToString(datareader["ChGoodsCode"]);

                pOrderData.orderSettlePrice_ = Convert.ToInt32(datareader["orderSettlePrice"]);
                pOrderData.orderName_        = Convert.ToString(datareader["orderName"]);
                pOrderData.orderPhone_       = Convert.ToString(datareader["orderPhone"]);
                //pOrderData.orderMethod_ = Convert.ToString(datareader["orderMethod"]);
                pOrderData.State_            = Convert.ToString(datareader["State"]);

                if (pList.ContainsKey(pOrderData.channelOrderCode_) == false)
                {
                    pList.Add(pOrderData.channelOrderCode_, pOrderData);
                }
                else
                {
                    NewLogManager2.Instance.Log(string.Format("Error Select_tblOrder_With_UID Same OrderCode {0}", pOrderData.channelOrderCode_));
                }
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool Select_tblOrder_With_UID - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #7
0
    public static bool Insert_tblOrder_test(SqlHelper dbHelper, Int32 GoodsSeq, Int32 channelSeq, string channelCode, float OrderPrice
        , Int32 OrderCount, string UserId, string UserName, string UserPhone, string State, string goodsNickName, string goodsOrgName
        , string RegDate, ref Int32 OrderSeq, ref string pin_m_num)
    {
        bool bResult = true;
        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xchannelSeq", channelSeq);
            argdic.Add("xchannelCode", channelCode);
            argdic.Add("xOrderPrice", OrderPrice);
            argdic.Add("xOrderCount", OrderCount);
            argdic.Add("xUserId", UserId);
            argdic.Add("xUserName", UserName);
            argdic.Add("xUserPhone", UserPhone);
            argdic.Add("xState", State);
            argdic.Add("xGoodsSeq", GoodsSeq);
            argdic.Add("xgoodsNickName", goodsNickName);
            argdic.Add("xgoodsOrgName", goodsOrgName);
            argdic.Add("xRegDate", RegDate);

            MySqlDataReader datareader = dbHelper.call_proc("spNewInsert_chOrder_Free", argdic);

            string strSeq = "";
            while (datareader.Read())
            {
                strSeq = Convert.ToString(datareader["OrderSeq"]);
                OrderSeq = Convert.ToInt32(strSeq);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool Insert_tblOrder - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #8
0
    // 크롤링 정보 로드 하기
    public static bool GetCrawlerInfo(SqlHelper dbHelper, Int32 nChannelIdx, Int32 PartnerIdx, ref LQCrawlerInfo pLQCrawlerInfo)
    {
        bool bResult = false;

        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xChannelIdx", nChannelIdx.ToString());
            argdic.Add("xPartnerIdx", PartnerIdx.ToString());

            MySqlDataReader datareader = dbHelper.call_proc("sp_select_Crawler_Info", argdic);
            while (datareader.Read())
            {
                bResult = true;

                pLQCrawlerInfo = new LQCrawlerInfo();
                pLQCrawlerInfo.nIdx_ = Convert.ToInt32(datareader["idx"]);
                pLQCrawlerInfo.Channel_Idx_ = Convert.ToInt32(datareader["Channel_Idx"]);
                pLQCrawlerInfo.ChannelName_ = Convert.ToString(datareader["AuthorityName"]);
                pLQCrawlerInfo.PartnerSeq_ = Convert.ToInt32(datareader["PartnerSeq"]);
                pLQCrawlerInfo.PartnerName_ = Convert.ToString(datareader["PartnerName"]);

                pLQCrawlerInfo.MainUrl_ = Convert.ToString(datareader["MainUrl"]);         // 메인 URL
                pLQCrawlerInfo.LoginIDTAG_ = Convert.ToString(datareader["LoginIDTAG"]);
                pLQCrawlerInfo.LoginPWTAG_ = Convert.ToString(datareader["LoginPWTAG"]);
                pLQCrawlerInfo.LoginUrl_ = Convert.ToString(datareader["LoginUrl"]);
                pLQCrawlerInfo.LoginParam_ = Convert.ToString(datareader["LoginParam"]);      // 로그인 셋팅값
                pLQCrawlerInfo.LoginID_ = Convert.ToString(datareader["LoginID"]);         // 로그인 아이디
                pLQCrawlerInfo.LoginPW_ = Convert.ToString(datareader["LoginPW"]);         // 로그인 암호
                pLQCrawlerInfo.LoginMethod_ = Convert.ToString(datareader["LoginMethod"]);     // 로그인 방식
                pLQCrawlerInfo.LoginEvent_ = Convert.ToString(datareader["LoginEvent"]);      // 로그인 버튼 이벤트
                pLQCrawlerInfo.LoginCheck_ = Convert.ToString(datareader["LoginCheck"]);
                pLQCrawlerInfo.LoginType_ = Convert.ToChar(datareader["LoginType"]);
                pLQCrawlerInfo.ExcelDownUrl_ = Convert.ToString(datareader["ExcelDownUrl"]);    // 엑셀 다운로드 URL
                pLQCrawlerInfo.ExcelDownParameter_ = Convert.ToString(datareader["ExcelDownParameter"]);
                pLQCrawlerInfo.ExcelDownMethod_ = Convert.ToString(datareader["ExcelDownMethod"]);    // 엑셀 다운로드 방식
                pLQCrawlerInfo.ExcelDownRule_ = Convert.ToString(datareader["ExcelDownRule"]);

                pLQCrawlerInfo.UseGoodsUrl_ = Convert.ToString(datareader["UseGoodsUrl"]);
                pLQCrawlerInfo.UseGoodsParam_ = Convert.ToString(datareader["UseGoodsParam"]);
                pLQCrawlerInfo.UseGoodsCheck_ = Convert.ToString(datareader["UseGoodsCheck"]);
                pLQCrawlerInfo.UseGoodsRule_ = Convert.ToString(datareader["UseGoodsRule"]);

                pLQCrawlerInfo.UseUserUrl_ = Convert.ToString(datareader["UseUserUrl"]);
                pLQCrawlerInfo.UseUserParam_ = Convert.ToString(datareader["UseUserParam"]);
                pLQCrawlerInfo.UseUserCheck_ = Convert.ToString(datareader["UseUserCheck"]);

                pLQCrawlerInfo.NUseGoodsUrl_ = Convert.ToString(datareader["NUseGoodsUrl"]);
                pLQCrawlerInfo.NUseGoodsParam_ = Convert.ToString(datareader["NUseGoodsParam"]);
                pLQCrawlerInfo.NUseGoodsCheck_ = Convert.ToString(datareader["NUseGoodsCheck"]);
                pLQCrawlerInfo.NUseGoodsRule_ = Convert.ToString(datareader["NUseGoodsRule"]);

                pLQCrawlerInfo.NUseUserUrl_ = Convert.ToString(datareader["NUseUserUrl"]);
                pLQCrawlerInfo.NUseUserParam_ = Convert.ToString(datareader["NUseUserParam"]);
                pLQCrawlerInfo.NUseUserCheck_ = Convert.ToString(datareader["NUseUserCheck"]);

                pLQCrawlerInfo.RUseUserUrl_ = Convert.ToString(datareader["RUseUserUrl"]);
                pLQCrawlerInfo.RUseUserParam_ = Convert.ToString(datareader["RUseUserParam"]);
                pLQCrawlerInfo.RUseUserCheck_ = Convert.ToString(datareader["RUseUserCheck"]);

                pLQCrawlerInfo.ExData_Start_ = Convert.ToInt32(datareader["ExData_Start"]);
                pLQCrawlerInfo.ExData_Coupncode_ = Convert.ToInt32(datareader["ExData_Coupncode"]);
                pLQCrawlerInfo.ExData_Buydate_ = Convert.ToInt32(datareader["ExData_Buydate"]);
                pLQCrawlerInfo.ExData_Option_ = Convert.ToInt32(datareader["ExData_Option"]);
                pLQCrawlerInfo.ExData_Cancel_ = Convert.ToInt32(datareader["ExData_Cancel"]);
                pLQCrawlerInfo.ExData_Count_ = Convert.ToInt32(datareader["ExData_Count"]);
                pLQCrawlerInfo.ExData_Use_ = Convert.ToInt32(datareader["ExData_Use"]);
                pLQCrawlerInfo.ExData_Buyer_ = Convert.ToInt32(datareader["ExData_Buyer"]);
                pLQCrawlerInfo.ExData_Buyphone_ = Convert.ToInt32(datareader["ExData_Buyphone"]);
                pLQCrawlerInfo.ExData_Price_ = Convert.ToInt32(datareader["ExData_Price"]);
                pLQCrawlerInfo.ExData_UseCheck_ = Convert.ToString(datareader["ExData_UseCheck"]);
                pLQCrawlerInfo.ExData_CancelCheck_ = Convert.ToString(datareader["ExData_CancelCheck"]);

                break;
            }
            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool GetCrawlerInfo - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #9
0
        // 모든 크롤러 정보 로드 하기
        public bool SelectAllChannelInfos()
        {
            try
            {
                SqlHelper pMySqlDB = new SqlHelper();

                pMySqlDB.Connect(CrawlerInfoManager.Instance.method_, CrawlerInfoManager.Instance.dbip_, CrawlerInfoManager.Instance.dbport_, CrawlerInfoManager.Instance.dbname_
                    , CrawlerInfoManager.Instance.dbaccount_, CrawlerInfoManager.Instance.dbpw_, CrawlerInfoManager.Instance.sshhostname_, CrawlerInfoManager.Instance.sshuser_
                    , CrawlerInfoManager.Instance.sshpw_);

                MySqlDataReader datareader = pMySqlDB.call_proc("sp_select_All_Crawler_Info", null);

                while (datareader.Read())
                {
                    LQCrawlerInfo pInfo = new LQCrawlerInfo();
                    pInfo.nIdx_ = Convert.ToInt32(datareader["idx"]);
                    pInfo.Channel_Idx_ = Convert.ToInt32(datareader["Channel_Idx"]);
                    pInfo.ChannelName_ = Convert.ToString(datareader["Channel_Name"]);
                    pInfo.PartnerSeq_ = Convert.ToInt32(datareader["PartnerSeq"]);
                    pInfo.PartnerName_ = Convert.ToString(datareader["PartnerName"]);

                    // 권리사 (2014-07-30) . 추가
                    pInfo.AuthoritySeq_ = Convert.ToInt32(datareader["AuthoritySeq"]);
                    pInfo.AuthoriryName_ = Convert.ToString(datareader["AuthorityName"]);

                    pInfo.MainUrl_ = Convert.ToString(datareader["MainUrl"]);         // 메인 URL
                    pInfo.LoginIDTAG_ = Convert.ToString(datareader["LoginIDTAG"]);
                    pInfo.LoginPWTAG_ = Convert.ToString(datareader["LoginPWTAG"]);
                    pInfo.LoginUrl_ = Convert.ToString(datareader["LoginUrl"]);
                    pInfo.LoginParam_ = Convert.ToString(datareader["LoginParam"]);      // 로그인 셋팅값
                    pInfo.LoginID_ = Convert.ToString(datareader["LoginID"]);         // 로그인 아이디
                    pInfo.LoginPW_ = Convert.ToString(datareader["LoginPW"]);         // 로그인 암호
                    pInfo.LoginMethod_ = Convert.ToString(datareader["LoginMethod"]);     // 로그인 방식
                    pInfo.LoginEvent_ = Convert.ToString(datareader["LoginEvent"]);      // 로그인 버튼 이벤트
                    pInfo.LoginCheck_ = Convert.ToString(datareader["LoginCheck"]);
                    pInfo.LoginType_ = Convert.ToChar(datareader["LoginType"]);
                    pInfo.ExcelDownUrl_ = Convert.ToString(datareader["ExcelDownUrl"]);    // 엑셀 다운로드 URL
                    pInfo.ExcelDownParameter_ = Convert.ToString(datareader["ExcelDownParameter"]);
                    pInfo.ExcelDownMethod_ = Convert.ToString(datareader["ExcelDownMethod"]);    // 엑셀 다운로드 방식
                    pInfo.ExcelDownRule_ = Convert.ToString(datareader["ExcelDownRule"]);

                    pInfo.UseGoodsUrl_ = Convert.ToString(datareader["UseGoodsUrl"]);
                    pInfo.UseGoodsParam_ = Convert.ToString(datareader["UseGoodsParam"]);
                    pInfo.UseGoodsCheck_ = Convert.ToString(datareader["UseGoodsCheck"]);
                    pInfo.UseGoodsRule_ = Convert.ToString(datareader["UseGoodsRule"]);

                    pInfo.UseUserUrl_ = Convert.ToString(datareader["UseUserUrl"]);
                    pInfo.UseUserParam_ = Convert.ToString(datareader["UseUserParam"]);
                    pInfo.UseUserCheck_ = Convert.ToString(datareader["UseUserCheck"]);

                    pInfo.NUseGoodsUrl_ = Convert.ToString(datareader["NUseGoodsUrl"]);
                    pInfo.NUseGoodsParam_ = Convert.ToString(datareader["NUseGoodsParam"]);
                    pInfo.NUseGoodsCheck_ = Convert.ToString(datareader["NUseGoodsCheck"]);
                    pInfo.NUseGoodsRule_ = Convert.ToString(datareader["NUseGoodsRule"]);

                    pInfo.NUseUserUrl_ = Convert.ToString(datareader["NUseUserUrl"]);
                    pInfo.NUseUserParam_ = Convert.ToString(datareader["NUseUserParam"]);
                    pInfo.NUseUserCheck_ = Convert.ToString(datareader["NUseUserCheck"]);

                    pInfo.RUseUserUrl_ = Convert.ToString(datareader["RUseUserUrl"]);
                    pInfo.RUseUserParam_ = Convert.ToString(datareader["RUseUserParam"]);
                    pInfo.RUseUserCheck_ = Convert.ToString(datareader["RUseUserCheck"]);

                    pInfo.ExData_Start_ = Convert.ToInt32(datareader["ExData_Start"]);
                    pInfo.ExData_Coupncode_ = Convert.ToInt32(datareader["ExData_Coupncode"]);
                    pInfo.ExData_Buydate_ = Convert.ToInt32(datareader["ExData_Buydate"]);
                    pInfo.ExData_Option_ = Convert.ToInt32(datareader["ExData_Option"]);
                    pInfo.ExData_Cancel_ = Convert.ToInt32(datareader["ExData_Cancel"]);
                    pInfo.ExData_Use_ = Convert.ToInt32(datareader["ExData_Use"]);
                    pInfo.ExData_Buyer_ = Convert.ToInt32(datareader["ExData_Buyer"]);
                    pInfo.ExData_Count_ = Convert.ToInt32(datareader["ExData_Count"]);
                    pInfo.ExData_Buyphone_ = Convert.ToInt32(datareader["ExData_Buyphone"]);
                    pInfo.ExData_Price_ = Convert.ToInt32(datareader["ExData_Price"]);
                    pInfo.ExData_UseCheck_ = Convert.ToString(datareader["ExData_UseCheck"]);
                    pInfo.ExData_CancelCheck_ = Convert.ToString(datareader["ExData_CancelCheck"]);

                    CrawlerInfoList_.Add(pInfo.AuthoritySeq_, pInfo);
                }

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(string.Format("채널정보 로드 실패 {0}",ex.Message));
                return false;
            }

            return true;
        }
Пример #10
0
    // 상품 옵션명, 옵션 닉네임 변경
    public static bool UpdateGoodsNickName(SqlHelper dbHelper, Int32 xGoodsSeq, string xGoodsNickName, string xGoodsOptionNickName)
    {
        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xGoodsSeq", xGoodsSeq.ToString());
            argdic.Add("xGoodsNickName", xGoodsNickName);
            argdic.Add("xGoodsOptionNickName", xGoodsOptionNickName);

            MySqlDataReader datareader = dbHelper.call_proc("spNewUpdateGoodsNickName", argdic);

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #11
0
    // 모니터 정보 변경
    public static bool UpdateCrawlerMonitorInfo(SqlHelper dbHelper, Int32 xMonitorSeq, string xCrawlerName, Int32 xChannelSeq, string xChannelName
        , Int32 xAuthoritySeq, string xAuthorityName, Int32 xCrawlerSeq, Int32 xMode, string xCrawler_OnOff, string xCrawler_location, Int32 xCrawlerCheckTime
        , Int32 xDBUpdateTime, string xMemo, Int32 xAuthorityLoginSeq, string xAuthorityLoginName)
    {
        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xMonitorSeq", xMonitorSeq.ToString());
            argdic.Add("xCrawlerName", xCrawlerName);
            argdic.Add("xChannelSeq", xChannelSeq.ToString());
            argdic.Add("xChannelName", xChannelName);
            argdic.Add("xAuthoritySeq", xAuthoritySeq.ToString());
            argdic.Add("xAuthorityName", xAuthorityName);
            argdic.Add("xAuthorityLoginSeq", xAuthorityLoginSeq.ToString());
            argdic.Add("xAuthorityLoginName", xAuthorityLoginName);
            argdic.Add("xCrawlerSeq", xCrawlerSeq.ToString());
            argdic.Add("xMode", xMode.ToString());
            argdic.Add("xCrawler_OnOff", xCrawler_OnOff.ToString());
            argdic.Add("xCrawler_location", xCrawler_location);
            argdic.Add("xCrawlerCheckTime", xCrawlerCheckTime.ToString());
            argdic.Add("xDBUpdateTime", xDBUpdateTime.ToString());
            argdic.Add("xMemo", xMemo);

            MySqlDataReader datareader = dbHelper.call_proc("spNewUpdateCrawlerMonitorInfo", argdic);

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #12
0
    // 크롤링 정보 로드
    public static bool GetAllCrawlerMonitor(SqlHelper dbHelper)
    {
        try
        {
            CInfoManager.Instance.InitList();
            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectCrawlerMonitor", null);

            while (datareader.Read())
            {
                CrawlerData pCrawlerData = new CrawlerData();

                if (datareader["seq"] != null)
                    pCrawlerData.seq_ = Convert.ToInt32(datareader["seq"]);

                if (datareader["CrawlerName"] != null && datareader["CrawlerName"] != DBNull.Value)
                    pCrawlerData.CrawlerName_ = Convert.ToString(datareader["CrawlerName"]);

                if (datareader["ChannelSeq"] != null && datareader["ChannelSeq"] != DBNull.Value)
                    pCrawlerData.ChannelSeq_ = Convert.ToInt32(datareader["ChannelSeq"]);

                if (datareader["ChannelName"] != null && datareader["ChannelName"] != DBNull.Value)
                    pCrawlerData.ChannelName_ = Convert.ToString(datareader["ChannelName"]);

                if (datareader["AuthoritySeq"] != null && datareader["AuthoritySeq"] != DBNull.Value)
                    pCrawlerData.AuthoritySeq_ = Convert.ToInt32(datareader["AuthoritySeq"]);

                if (datareader["AuthorityName"] != null && datareader["AuthorityName"] != DBNull.Value)
                    pCrawlerData.AuthorityName_ = Convert.ToString(datareader["AuthorityName"]);

                if (datareader["AuthorityLoginSeq"] != null && datareader["AuthorityLoginSeq"] != DBNull.Value)
                    pCrawlerData.AuthorityLoginSeq_ = Convert.ToInt32(datareader["AuthorityLoginSeq"]);

                if (datareader["AuthorityLoginName"] != null && datareader["AuthorityLoginName"] != DBNull.Value)
                    pCrawlerData.AuthorityLoginName_ = Convert.ToString(datareader["AuthorityLoginName"]);

                if (datareader["CrawlerSeq"] != null && datareader["CrawlerSeq"] != DBNull.Value)
                    pCrawlerData.CrawlerSeq_ = Convert.ToInt32(datareader["CrawlerSeq"]);

                if (datareader["Mode"] != null && datareader["Mode"] != DBNull.Value)
                    pCrawlerData.Mode_ = Convert.ToInt32(datareader["Mode"]);

                if (datareader["Memo"] != null && datareader["Memo"] != DBNull.Value)
                    pCrawlerData.Memo_ = Convert.ToString(datareader["Memo"]);

                if (datareader["IP"] != null && datareader["IP"] != DBNull.Value)
                    pCrawlerData.IP_ = Convert.ToString(datareader["IP"]);

                if (datareader["CrawlerState"] != null && datareader["CrawlerState"] != DBNull.Value)
                    pCrawlerData.CrawlerState_ = Convert.ToString(datareader["CrawlerState"]);

                if (datareader["UpdateDate"] != null && datareader["UpdateDate"] != DBNull.Value)
                    pCrawlerData.UpdateDate_ = Convert.ToString(datareader["UpdateDate"]);

                CInfoManager.Instance.GetList().Add(pCrawlerData.seq_, pCrawlerData);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #13
0
    // 매니저 로그인
    public static bool LoginManager(SqlHelper dbHelper, string id, string pw)
    {
        Int32 SelectCount = 0;
        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xAdminId", id);
            argdic.Add("xAdminPw", pw);

            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectAdminLogin", argdic);
            while (datareader.Read())
            {
                CInfoManager.Instance.AdminInfoData_.Seq_ = Convert.ToInt32(datareader["Seq"]);
                CInfoManager.Instance.AdminInfoData_.adminName_ = Convert.ToString(datareader["adminName"]);
                CInfoManager.Instance.AdminInfoData_.Mobile_ = Convert.ToString(datareader["Mobile"]);

                SelectCount++;
                break;
            }
            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        if (SelectCount == 0)
            return false;

        return true;
    }
Пример #14
0
    // 상품 정보 로드하기
    public static bool GetGoodsTable(SqlHelper dbHelper)
    {
        try
        {
            GoodsManager.Instance.InitList();

            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectGoods", null);

            while (datareader.Read())
            {
                CGoodsData pCGoodsData = new CGoodsData();
                if (datareader["seq"] != DBNull.Value)
                    pCGoodsData.Seq_ = Convert.ToInt32(datareader["seq"]);

                if (datareader["GoodsCode"] != DBNull.Value)
                    pCGoodsData.Goods_Code_ = Convert.ToString(datareader["GoodsCode"]);

                if (datareader["GoodsName"] != DBNull.Value)
                    pCGoodsData.GoodsName_ = Convert.ToString(datareader["GoodsName"]);

                if (datareader["GoodsNick"] != DBNull.Value)
                    pCGoodsData.GoodsNickName_ = Convert.ToString(datareader["GoodsNick"]);

                if (datareader["GoodsOptionName"] != DBNull.Value)
                    pCGoodsData.OptionName_ = Convert.ToString(datareader["GoodsOptionName"]);

                if (datareader["GoodsNickName"] != DBNull.Value)
                    pCGoodsData.OptionNickName_ = Convert.ToString(datareader["GoodsNickName"]);

                if (datareader["ChannelSeq"] != DBNull.Value)
                    pCGoodsData.ChannelSeq_ = Convert.ToInt32(datareader["ChannelSeq"]);

                if (datareader["AuthoritySeq"] != DBNull.Value)
                    pCGoodsData.AuthoritySeq_ = Convert.ToInt32(datareader["AuthoritySeq"]);

                if (datareader["AuthorityLoginSeq"] != DBNull.Value)
                    pCGoodsData.AuthorityLoginSeq_ = Convert.ToInt32(datareader["AuthorityLoginSeq"]);

                if (datareader["CrawlerSeq"] != DBNull.Value)
                    pCGoodsData.CrawlerSeq_ = Convert.ToInt32(datareader["CrawlerSeq"]);

                if (datareader["State"] != DBNull.Value)
                    pCGoodsData.State_ = Convert.ToString(datareader["State"]);

                GoodsManager.Instance.GetList().Add(pCGoodsData.Seq_, pCGoodsData);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #15
0
    // 채널 정보 로드
    public static bool GetChannelList(SqlHelper dbHelper)
    {
        try
        {
            ChannelManager.Instance.InitList();

            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectChannel", null);

            Int32 ComboIndex = 1;
            while (datareader.Read())
            {
                ChannelInfoData pChannelInfoData = new ChannelInfoData();

                if (datareader["seq"] != DBNull.Value)
                    pChannelInfoData.seq_ = Convert.ToInt32(datareader["seq"]);

                if (datareader["ChannelCode"] != DBNull.Value)
                    pChannelInfoData.ChannelCode_ = Convert.ToString(datareader["ChannelCode"]);

                if (datareader["ChannelName"] != DBNull.Value)
                    pChannelInfoData.ChannelName_ = Convert.ToString(datareader["ChannelName"]);

                pChannelInfoData.ComboIndex_ = ComboIndex++;    // 콤보 박스에서 사용되는 인덱스
                ChannelManager.Instance.GetList().Add(pChannelInfoData.seq_, pChannelInfoData);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            return false;
        }

        return true;
    }
Пример #16
0
        public static bool UpdateCrawlerMonitorInfo(SqlHelper dbHelper, Int32 xMonitorSeq, string xIpAddress, Int32 xPort, string xCrawlerState
            , ref Int32 Result, ref Int32 ChannelSeq, ref Int32 AuthoritySeq, ref Int32 Mode, ref Int32 CrawlerSeq)
        {
            Result = 0;
            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xMonitorSeq", xMonitorSeq.ToString());
                argdic.Add("xIpAddress", xIpAddress);
                argdic.Add("xPort", xPort.ToString());
                argdic.Add("xCrawlerState", xCrawlerState);

                MySqlDataReader datareader = dbHelper.call_proc("spNewUpdateCrawlerMonitor", argdic);

                while (datareader.Read())
                {
                    Result = Convert.ToInt32(datareader["RESULT"]);
                    if (Result == 0)
                    {
                        break;
                    }

                    if (datareader["AuthoritySeq"] != DBNull.Value)
                        AuthoritySeq = Convert.ToInt32(datareader["AuthoritySeq"]);
                    if (datareader["ChannelSeq"] != DBNull.Value)
                        ChannelSeq = Convert.ToInt32(datareader["ChannelSeq"]);
                    if (datareader["Mode"] != DBNull.Value)
                        Mode = Convert.ToInt32(datareader["Mode"]);
                    if (datareader["CrawlerSeq"] != DBNull.Value)
                        CrawlerSeq = Convert.ToInt32(datareader["CrawlerSeq"]);

                    break;
                }

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                return false;
            }

            return true;
        }
Пример #17
0
    // DB 에서 상품 코드 읽어오기
    public static bool GetGoodsTableWithUID(SqlHelper dbHelper, Int32 nChannelIdx, Int32 nAuthorityIdx, Int32 nUID, ref Dictionary<Int32, ChannelGoodInfo> pInfoList)
    {
        pInfoList.Clear();

        bool bResult = true;

        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xChannelSeq", nChannelIdx.ToString());
            argdic.Add("xAuthoritySeq", nAuthorityIdx.ToString());
            argdic.Add("xCrawlerSeq", nUID.ToString());

            MySqlDataReader datareader = dbHelper.call_proc("spNewSelectGoodsInfo", argdic);
            string availableData = "";
            while (datareader.Read())
            {
                ChannelGoodInfo pGoodInfo = new ChannelGoodInfo();

                pGoodInfo.Idx_ = Convert.ToInt32(datareader["seq"]);
                pGoodInfo.Goods_Code_ = Convert.ToString(datareader["ChGoodsCode"]);
                pGoodInfo.GoodsName_ = Convert.ToString(datareader["GoodsName"]);
                pGoodInfo.GoodsNickName_ = Convert.ToString(datareader["GoodsNick"]);
                pGoodInfo.GoodsPassType_ = Convert.ToString(datareader["GoodsPassType"]);
                pGoodInfo.GoodsSendType_ = Convert.ToInt32(datareader["GoodsSendType"]);
                pGoodInfo.sDate_ = Convert.ToString(datareader["GoodsSdate"]);
                pGoodInfo.eDateFormat_ = Convert.ToString(datareader["GoodsEdateFormat"]);
                availableData = Convert.ToString(datareader["AvailableDate"]);
                pGoodInfo.OptionName_ = Convert.ToString(datareader["GoodsOptionName"]);
                pGoodInfo.OptionNickName_ = Convert.ToString(datareader["GoodsNickName"]);
                pGoodInfo.GoodsAttrType_ = Convert.ToInt32(datareader["GoodsAttrType"]);

                if (string.IsNullOrEmpty(pGoodInfo.Goods_Code_) == true)
                {
                    string LogMessage = string.Format("bool GetGoodsTable 상품코드가 지정되어 있지 않아서 상품은 건너 뜁니다.{0}/{1}"
                        , pGoodInfo.Goods_Code_, pGoodInfo.GoodsName_);
                    NewLogManager2.Instance.Log(LogMessage);
                    continue;
                }

                if (string.IsNullOrEmpty(pGoodInfo.OptionNickName_) == true)
                {
                    string LogMessage = string.Format("bool GetGoodsTable 상품 옵션명이 지정되지 않아서 이 상품은 건너 뜁니다.{0}/{1}"
                        , pGoodInfo.Goods_Code_, pGoodInfo.OptionNickName_);
                    NewLogManager2.Instance.Log(LogMessage);
                    continue;
                }

                if (string.IsNullOrEmpty(availableData) == false)
                {
                    if (Regex.IsMatch(availableData, @"^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[0-1])$") == true)
                    {
                        pGoodInfo.availableDateTime_ = Convert.ToDateTime(availableData);
                        pGoodInfo.Expired_ = true;
                    }
                }
                pInfoList.Add(pGoodInfo.Idx_, pGoodInfo);

            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool GetGoodsTableWithUID - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #18
0
        public static bool Insert_SMS(SqlHelper dbHelper, Int32 xSOrderSeq, Int32 xEOrderSeq)
        {
            bool bResult = true;

            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xSOrderSeq", xSOrderSeq);
                argdic.Add("xEOrderSeq", xEOrderSeq);

                MySqlDataReader datareader = dbHelper.call_proc("sp_insert_Sms", argdic);

                //string strSeq = "";
                //while (datareader.Read())
                //{
                //    strSeq = Convert.ToString(datareader["OrderSeq"]);
                //}

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(ex.Message);
                bResult = false;
            }

            return bResult;
        }
Пример #19
0
    public static bool Insert_SMS(SqlHelper dbHelper, Int32 xSOrderSeq, Int32 xEOrderSeq)
    {
        bool bResult = true;

        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xSOrderSeq", xSOrderSeq);
            argdic.Add("xEOrderSeq", xEOrderSeq);

            //MySqlDataReader datareader = dbHelper.call_proc("sp_insert_BARCODE", argdic);
            MySqlDataReader datareader = dbHelper.call_proc("sp_insert_Sms", argdic);
            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool Insert_SMS - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #20
0
        // 쿠폰 정보 입력.
        public static bool Insert_tblWrongOrder(SqlHelper dbHelper, Int32 xchannelSeq, string xchannelOrderCode, float xorderSettlePrice
            , string xorderName, string xorderOptionName, Int32 xorderCount, string xorderPhone, string xstate)
        {
            bool bResult = true;

            try
            {
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xchannelSeq", xchannelSeq);
                argdic.Add("xchannelOrderCode", xchannelOrderCode);
                argdic.Add("xorderSettlePrice", xorderSettlePrice);
                argdic.Add("xorderName", xorderName);
                argdic.Add("xorderOptionName", xorderOptionName);
                argdic.Add("xorderPhone", xorderPhone);
                argdic.Add("xorderCount", xorderCount);
                argdic.Add("xstate", xstate);

                MySqlDataReader datareader = dbHelper.call_proc("sp_insert_tblWrongOrder", argdic);
                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(ex.Message);
                bResult = false;
            }

            return bResult;
        }
Пример #21
0
    // 각각의 상태 정보 로드
    public static bool SelectStateTable(SqlHelper dbHelper)
    {
        DealStateManager.Instance.Init();

        bool bResult = true;

        try
        {
            MySqlDataReader datareader = dbHelper.call_proc("sp_select_StateTable", null);

            while (datareader.Read())
            {
                Int32 nStateType = Convert.ToInt32(datareader["StateType"]);
                string strStateName = Convert.ToString(datareader["StateName"]);
                string strExplain = Convert.ToString(datareader["Explain"]);

                DealStateManager.Instance.Add(nStateType, strStateName, strExplain);
            }

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool SelectStateTable - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #22
0
        // DB에서 사용처리 해야하는 테이블 로드
        public static bool Select_tblOrder(SqlHelper dbHelper, Int32 xchannelSeq)
        {
            bool bResult = true;

            try
            {
                // 2014.06.05
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xChannelIdx", xchannelSeq);

                MySqlDataReader datareader = dbHelper.call_proc("sp_select_OrderInfo", argdic);

                while (datareader.Read())
                {
                    tblOrderData pOrderData = new tblOrderData();
                    pOrderData.NeedDBProc_ = tblOrderData.NeedDBProc.None;
                    pOrderData.seq_ = Convert.ToInt64(datareader["seq"]);
                    pOrderData.goodsSeq_ = Convert.ToInt32(datareader["goodsSeq"]);
                    pOrderData.memberSeq_ = Convert.ToInt32(datareader["memberSeq"]);
                    pOrderData.channelSeq_ = Convert.ToInt32(datareader["channelSeq"]);

                    pOrderData.channelOrderCode_ = Convert.ToString(datareader["channelOrderCode"]);
                    pOrderData.orderReserveCode_ = Convert.ToString(datareader["orderCode"]);
                    pOrderData.orderID_ = Convert.ToString(datareader["orderId"]);

                    pOrderData.orderSettlePrice_ = Convert.ToInt32(datareader["orderSettlePrice"]);
                    pOrderData.orderName_ = Convert.ToString(datareader["orderName"]);
                    pOrderData.orderPhone_ = Convert.ToString(datareader["orderPhone"]);
                    //pOrderData.orderMethod_ = Convert.ToString(datareader["orderMethod"]);
                    pOrderData.State_ = Convert.ToString(datareader["State"]);

                    OrderManager.Instance.AddOrderData(pOrderData);
                }

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(ex.Message);
                bResult = false;
            }

            return bResult;
        }
Пример #23
0
    // 사용처리 원래대로 되돌리는 프로시저
    public static bool Update_OrderInfo_FixUP(SqlHelper dbHelper, Int32 xOrderSeq, string xState)
    {
        bool bResult = true;

        try
        {
            Dictionary<string, object> argdic = new Dictionary<string, object>();
            argdic.Add("xOrderSeq", xOrderSeq);
            argdic.Add("xState", xState);

            MySqlDataReader datareader = dbHelper.call_proc("spNewUpdateSyncOrderInfo", argdic);

            datareader.Close();
            datareader.Dispose();
            datareader = null;
        }
        catch (System.Exception ex)
        {
            NewLogManager2.Instance.Log(string.Format("Error bool Update_OrderInfo_FixUP - {0}", ex.Message));
            bResult = false;
        }

        return bResult;
    }
Пример #24
0
        public static bool Select_tblOrderWr(SqlHelper dbHelper, Int32 xchannelSeq)
        {
            bool bResult = true;

            try
            {
                // 2014.06.05
                Dictionary<string, object> argdic = new Dictionary<string, object>();
                argdic.Add("xChannelIdx", xchannelSeq);

                MySqlDataReader datareader = dbHelper.call_proc("sp_select_OrderWrInfo", argdic);

                while (datareader.Read())
                {
                    tblOrderData pOrderData = new tblOrderData();
                    pOrderData.channelOrderCode_ = Convert.ToString(datareader["channelOrderCode"]);
                    pOrderData.NeedDBProc_ = tblOrderData.NeedDBProc.None;
                    OrderManager.Instance.AddWrongData(pOrderData);
                }

                datareader.Close();
                datareader.Dispose();
                datareader = null;
            }
            catch (System.Exception ex)
            {
                LogManager.Instance.Log(ex.Message);
                bResult = false;
            }

            return bResult;
        }