/// <summary> /// 로그인체크 /// </summary> /// <param name="sId"></param> /// <param name="sPwd"></param> /// <returns></returns> public bool CheckLogin(string sId, string sPwd) { bool bRet = false; int iCount = -1; string sQuery = "SELECT count(*) FROM EMPMST " + "WHERE EMP_ID =" + "'" + sId + "'" + "AND EMP_PASS ="******"'" + sPwd + "'"; SqlDataReader sqlRead = null; try { sqlRead = clsDb.GetData(sQuery); if (sqlRead.Read() == true) { iCount = (int)sqlRead[0]; if (iCount > 0) { bRet = true; } } } catch (Exception ex) { ClsLog.WriteLog(ClsLog.LOG_EXCEPTION, System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); } finally { if (sqlRead.IsClosed != true) { sqlRead.Close(); } } return(bRet); }
/// <summary> /// 상품검색 /// </summary> /// <param name="sCode"></param> /// <returns></returns> public Dictionary <string, string> SearchGoods(String sCode) { SqlDataReader sqlRead = null; Dictionary <string, string> dicGoods = null; string sQuery = null; try { sQuery = "SELECT PLU_CD as colCode," + "PLU_NM as colTitle, " + "SALE_PRICE as colUnitPrice, " + "CASE WHEN TAX_YN = '1' THEN '과세' " + "ELSE '비과세' " + "END as colRemarks " + "FROM PLUMST " + "WHERE PLU_CD = " + "'" + sCode + "'"; sqlRead = clsDb.GetData(sQuery); while (sqlRead.Read() == true) { dicGoods = new Dictionary <string, string>(); dicGoods["colCode"] = sqlRead["colCode"].ToString(); dicGoods["colTitle"] = sqlRead["colTitle"].ToString(); dicGoods["colUnitPrice"] = sqlRead["colUnitPrice"].ToString(); dicGoods["colRemarks"] = sqlRead["colRemarks"].ToString(); dicGoods["colQty"] = "1"; dicGoods["colDisCount"] = "0"; dicGoods["colTaxYn"] = "N"; dicGoods["colPrice"] = sqlRead["colUnitPrice"].ToString(); } } catch (Exception ex) { ClsLog.WriteLog(ClsLog.LOG_EXCEPTION, System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); } finally { if (sqlRead.IsClosed != true) { sqlRead.Close(); } } return(dicGoods); }
/// <summary> /// 공지사항 리스트 /// </summary> /// <returns></returns> public List <string[]> SearchNoticeList() { List <string[]> liNotice = new List <string[]>(); String sQuery = "SELECT * " + "FROM NoticeList " + "ORDER BY creDate desc " + "OFFSET 0 ROWS " + "FETCH NEXT 10 ROWS ONLY"; SqlDataReader sqlRead = null; string[] arrNotice = null; try { sqlRead = clsDb.GetData(sQuery); while (sqlRead.Read() == true) { arrNotice = new string[2]; arrNotice[0] = sqlRead["nNoticeSeq"].ToString(); arrNotice[1] = sqlRead["sNoticeTitle"].ToString(); liNotice.Add(arrNotice); } } catch (Exception ex) { ClsLog.WriteLog(ClsLog.LOG_EXCEPTION, System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); } finally { if (sqlRead.IsClosed != true) { sqlRead.Close(); } } return(liNotice); }