/// <summary> /// 사용자정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static int DeleteUserInfo(string userid, string keyCode) { int result = -1; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@KEY_CODE", keyCode); string procedureName = "SP_USERINFO_DELETE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.ExecuteNonQuery(command); } catch (Exception ex) { WriteTextLog("DeleteUserInfo", ex.Message.ToString()); result = -1; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 사용자정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static string UpdateUserInfo(string userid, string password, string authCode) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@PASSWORD", password); param.Add("@KEY_CODE", authCode); string procedureName = "SP_USERINFO_UPDATE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("UpdateUserInfo", ex.Message.ToString()); result = "005"; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 사용자 정보를 가져옵니다. /// </summary> /// <param name="userID"></param> /// <returns></returns> public static DataTable GetProductList(SaleType saleType, SearchType searchType, string keyword, string searchCount) { DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { string procedureName = "SP_GET_PRODUCT_LIST"; ParameterEngine param = ParameterEngine.New(da); param.Add("@SEARCH_TYPE", searchType.ToString().ToUpper()); param.Add("@SALE_TYPE", saleType.ToString().ToUpper()); param.Add("@KEY_WORD", keyword); param.Add("@SEARCH_COUNT", searchCount); DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); dt = da.GetData(command); } catch (Exception ex) { WriteTextLog("GetUserList", ex.Message.ToString()); } finally { DisConnect(ref da); } return(dt); }
/// <summary> /// KeyWord 정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static void UpdateIPChangFlage(string userid, string flag) { DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@FLAG", flag); string procedureName = "SP_UPDATE_IPCHANGE_FLAG"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.ExecuteNonQuery(command); } catch (Exception ex) { WriteTextLog("InsertKeyWordInfo", ex.Message.ToString()); } finally { DisConnect(ref da); } }
/// <summary> /// 비밀번호를 변경합니다. /// </summary> /// <param name="keyCode"></param> /// <param name="userID"></param> /// <param name="macAddress"></param> /// <param name="allowKeyCount"></param> /// <returns></returns> public static void UpdateChangePassword(string userID, string password) { DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userID); param.Add("@PASSWORD", password); string procedureName = "SP_PASSWORD_UPDATE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.ExecuteNonQuery(command); } catch (Exception ex) { WriteTextLog("UpdateChangePassword", ex.Message.ToString() + ex.StackTrace.ToString()); } finally { DisConnect(ref da); } }
public string MacAddressInfoInsert(string mac, string userName, string telNo) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@MAC_ADDRESS", mac); param.Add("@USER_NAME", userName); param.Add("@TEL_NO", telNo); string procedureName = "SP_INSTA_PRODUCTINFO_INSERT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { result = "003"; WriteTextLog("MacAddressInfoInsert", ex.Message.ToString()); } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 키워드 리스트를 가져옵니다. /// </summary> /// <param name="userID"></param> /// <returns></returns> public static DataTable GetKeyWordList(string keyCode) { DataTable result = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEYCODE", keyCode); string procedureName = "SP_KEYWORDINFO_SELECT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetData(command); result.Columns[4].ReadOnly = false; } catch (Exception ex) { WriteTextLog("GetKeyWordInfo", ex.Message.ToString()); } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 사용자 정보를 가져옵니다. /// </summary> /// <param name="userID"></param> /// <returns></returns> public static DataTable GetUserINfo(string userID) { DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userID); string procedureName = "SP_USER_INFO_SELECT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); dt = da.GetData(command); } catch (Exception ex) { WriteTextLog("GetUserINfo", ex.Message.ToString()); } finally { DisConnect(ref da); } return(dt); }
/// <summary> /// 상품정보를 업데이트 합니다. /// </summary> /// <param name="keyCode"></param> /// <param name="userID"></param> /// <param name="macAddress"></param> /// <param name="allowKeyCount"></param> /// <returns></returns> public static string DeleteProductInfo(string keyCode) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEY_CODE", keyCode); string procedureName = "SP_PRODUCT_INFO_DELETE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("DeleteProductInfo", ex.Message.ToString()); result = "005"; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 상품정보를 업데이트 합니다. /// </summary> /// <param name="keyCode"></param> /// <param name="userID"></param> /// <param name="macAddress"></param> /// <param name="allowKeyCount"></param> /// <returns></returns> public static void UpdateProductInfo(string keyCode, string userID, string macAddress, int allowKeyCount) { DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEY_CODE", keyCode); param.Add("@USERID", userID); param.Add("@MACADDRESS", macAddress); param.Add("@ALLOW_KEYWORD_CNT", allowKeyCount); string procedureName = "SP_PRODUCT_INFO_UPDATE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.ExecuteNonQuery(command); } catch (Exception ex) { WriteTextLog("UpdateProductInfo", ex.Message.ToString() + ex.StackTrace.ToString()); } finally { DisConnect(ref da); } }
public DataTable MacAuthCheck(string mac) { DataTable resultTable = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@MAC_ADDRESS", mac); string procedureName = "SP_INSTAGRAM_AUTH_CHECK"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); resultTable = da.GetData(command); } catch (Exception ex) { WriteTextLog("MacAuthCheck", ex.Message.ToString()); } finally { DisConnect(ref da); } return(resultTable); }
/// <summary> /// /// </summary> /// <param name="createKeyCodeCount">생성할 건수</param> /// <param name="saleType">판매타입</param> public static int CreateProductINfo(int createKeyCodeCount, SaleType saleType) { int result = createKeyCodeCount; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@SALE_TYPE", saleType.ToString().ToUpper()); param.Add("@KEYCODE_COUNT", createKeyCodeCount); string procedureName = "SP_KEY_CODE_CREATE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.ExecuteNonQuery(command); } catch (Exception ex) { WriteTextLog("CreateProductINfo", ex.Message.ToString()); result = 0; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// KeyWord 정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static string DeleteUserAgent(string userAgent) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USER_AGENT", userAgent); string procedureName = "SP_USER_AGENT_DELETE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("DeleteUserAgent", ex.Message.ToString()); } finally { DisConnect(ref da); } return(result); }
/// <summary> /// /// </summary> /// <returns></returns> public static DataTable UserAgentList() { DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); string procedureName = "SP_USER_AGENT_LIST"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); dt = da.GetData(command); } catch (Exception ex) { } finally { DisConnect(ref da); } return(dt); }
/// <summary> /// 사용자정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static string InsertUserInfo(string userid, string password, string userName, string userTelNo) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@PASSWORD", password); param.Add("@USER_NAME", userName); param.Add("@USER_TEL_NO", userTelNo); string procedureName = "SP_NEW_USERINFO_INSERT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("SP_NEW_USERINFO_INSERT:", ex.Message.ToString()); result = "003"; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// KeyWord 정보를 추가합니다. /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <param name="macAddress"></param> /// <param name="authCode"></param> /// <returns></returns> public static string InsertKeyWordInfo(string keycode, string keyword, string url, int maxpage, int delaytimest, int delaytimeet) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEY_CODE", keycode); param.Add("@KEYWORD", keyword); param.Add("@URL", url); param.Add("@MAXPAGE", maxpage); param.Add("@DELAYTIME_ST", delaytimest); param.Add("@DELAYTIME_ET", delaytimeet); string procedureName = "SP_KEYWORDINFO_INSERT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { result = "004"; WriteTextLog("InsertKeyWordInfo", ex.Message.ToString()); } finally { DisConnect(ref da); } return(result); }
/// <summary> /// 키워드 정보를 가져옵니다. /// </summary> /// <param name="userID"></param> /// <returns></returns> public static List <KeyWordDataEntity> GetKeyWordInfo(string keyCode) { List <KeyWordDataEntity> result = new List <KeyWordDataEntity>(); DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEYCODE", keyCode); string procedureName = "SP_KEYWORDINFO_LIST_SELECT"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); dt = da.GetData(command); } catch (Exception ex) { WriteTextLog("GetKeyWordInfo", ex.Message.ToString()); } finally { DisConnect(ref da); } if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { result.Add(new KeyWordDataEntity { KeyWord = dr["KEYWORD"].ToString(), URL = dr["URL"].ToString(), MaxPage = Convert.ToInt32(dr["MAXPAGE"].ToString()), DelayTimeST = Convert.ToInt32(dr["DELAYTIME_ST"].ToString()), DelayTimeET = Convert.ToInt32(dr["DELAYTIME_ET"].ToString()), ScrollByTerm = Common.RandomKeyValue(10, 100), PageByLoopTime = Common.RandomKeyValue(3, 5), ThreadTime = Common.RandomKeyValue(300, 1000) }); } } return(result); }
public string GettingIpChangeFlag(string userid) { string result = "N"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); string procedureName = "SP_SELECT_IPCHANGE_FLAG"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); WriteTextLog("result", result); if (result.ToUpper() == "Y") { param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@FLAG", "N"); procedureName = "SP_UPDATE_IPCHANGE_FLAG"; command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.ExecuteNonQuery(command); } } catch (Exception ex) { WriteTextLog("GetIPChangeFlag", ex.Message.ToString()); } finally { DisConnect(ref da); } return(result.ToUpper()); }
/// <summary> /// 상품정보를 업데이트 합니다. /// </summary> /// <param name="keyCode"></param> /// <param name="userID"></param> /// <param name="macAddress"></param> /// <param name="allowKeyCount"></param> /// <returns></returns> public static string UpdateProductInfo(string userID, string password, string keyCode, string macAddress, int allowKeyCount, string fromDt, string toDt, string saleCode, string saleDate, string dealCode) { string result = "001"; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@KEY_CODE", keyCode); param.Add("@USERID", userID); param.Add("@PWD", password); param.Add("@MACADDRESS", macAddress); param.Add("@ALLOW_KEYWORD_CNT", allowKeyCount); param.Add("@FROM_DT", fromDt); param.Add("@TO_DT", toDt); param.Add("@SALE_CODE", saleCode); param.Add("@SALE_DATE", saleDate); param.Add("@DEAL_CODE", dealCode); string procedureName = "SP_PRODUCT_INFO_ALL_UPDATE"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); result = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("UpdateProductInfo", ex.Message.ToString()); result = "005"; } finally { DisConnect(ref da); } return(result); }
/// <summary> /// /// </summary> /// <param name="userid"></param> /// <param name="password"></param> /// <returns></returns> public static bool IsUserLoginCheck(string userid, string password) { bool result = false; DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); param.Add("@USERID", userid); param.Add("@PWD", password); string procedureName = "SP_NEW_USER_LOGIN_CHECK"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); string value = da.GetSingleValue(command).ToString(); if (string.IsNullOrEmpty(value) == true || value == "N") { result = false; } else { result = true; } } catch { result = false; } finally { DisConnect(ref da); } return(result); }
public static DataTable GetUpGradeList(ref string serverVersion) { DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); string procedureName = "SP_UPDATEFILE_INFO"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); da.GetData(command, ref dt); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { serverVersion = dr["VERSION"].ToString(); break; } } } catch (Exception ex) { WriteTextLog("GetUpGradeList", ex.Message.ToString()); } finally { DisConnect(ref da); } return(dt); }
/// <summary> /// /// </summary> /// <returns></returns> public static List <string> UserAgentList() { List <string> result = new List <string>(); DataTable dt = new DataTable(); DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); string procedureName = "SP_USER_AGENT_LIST"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); dt = da.GetData(command); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { result.Add(dr["USER_AGENT"].ToString()); } } } catch (Exception ex) { } finally { DisConnect(ref da); } return(result); }
public static void GetUpGradeProgramInfo(ref string fileVersion) { DataAccess da = new SQLServerDB(); if (!da.IsConnected) { Connect(ref da); } try { ParameterEngine param = ParameterEngine.New(da); string procedureName = "SP_UPDATEFILE_INFO_AUTO"; DbCommand command = da.GenerateCommand(procedureName, CommandType.StoredProcedure, param); fileVersion = da.GetSingleValue(command).ToString(); } catch (Exception ex) { WriteTextLog("GetUpGradeList", ex.Message.ToString()); } finally { DisConnect(ref da); } }