Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        public ActionResult Update(int id, SaleType type)
        {
            var sale = _saleService.GetByID(id);

            sale.Status = type;

            _activityService.Create("status was updated " + type.ToString().AddSpacesToSentence(), AreaType.Sale, User.Identity.Name, sale.ID);

            _saleService.Save(sale);

            TempData.Add("StatusMessage", "Sales converted");
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        public ActionResult Update(int id, SaleType type)
        {
            var sale = _saleService.GetByID(id);
            sale.Status = type;

            _activityService.Create("status was updated " + type.ToString().AddSpacesToSentence(), AreaType.Sale, User.Identity.Name, sale.ID);

            _saleService.Save(sale);

            TempData.Add("StatusMessage", "Sales converted");
            return RedirectToAction("Index");
        }