示例#1
0
    //수정
    protected void updItem_Click(object sender, EventArgs e)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;
        String fileName  = "";

        try {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            if (itemImgUpd.HasFile)
            {
                fileName = itemImgUpd.FileName;
                fileName = @"D:\WEBHOSTING\ejdo\User\ItemImg" + @"\" + fileName;

                itemImgUpd.SaveAs(fileName);
            }
            else
            {
                fileName = itemImageViewUpd.Src;
            }

            objDas.AddParam("@pi_intItemNo", DBType.adInteger, itemNoVal.Value, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strItemName", DBType.adVarWChar, itemNameUpd.Text, 20, ParameterDirection.Input);
            objDas.AddParam("@pi_intPrice", DBType.adInteger, itemPriceUpd.Text, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strDetail", DBType.adVarWChar, itemDetailUpd.InnerText, 100000, ParameterDirection.Input);
            objDas.AddParam("@pi_strItemImg", DBType.adVarWChar, fileName, 100, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);

            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            objDas.SetQuery("dbo.UP_ITEM_TX_UPD"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            Response.Write("<script>alert('수정 되었습니다.')</script>");
            Response.Write("<script>location.href='../ItemMng/ItemList.aspx'</script>");
        }catch
        {
            Response.Write("<script>alert('수정 실패 하였습니다.')</script>");
        }finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }
示例#2
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 캐시 회수
    /// </summary>
    ///----------------------------------------------------------------------
    protected void btnCnl_Click(object sender, EventArgs e)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            if (balance < Convert.ToInt32((amount.Text).Replace(",", "")))
            {
                Response.Write("<script>alert('캐시가 부족합니다.');</script>");
                return;
            }

            objDas.AddParam("@pi_intChargeNo", DBType.adBigInt, chargeNo, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strUserId", DBType.adVarChar, userId, 20, ParameterDirection.Input);
            objDas.AddParam("@pi_intAmount", DBType.adInteger, Convert.ToInt32((amount.Text).Replace(",", "")), 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strAdminId", DBType.adVarChar, Session["adminId"], 20, ParameterDirection.Input);
            objDas.AddParam("@pi_strMemoDetail", DBType.adVarWChar, detail.Text, 20, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);

            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            objDas.SetQuery("dbo.UP_CHARGE_NT_CNL"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            Response.Write("<script>alert('회수되었습니다.');</script>");
            Response.Write("<script>window.opener.fnAfterCachMng('" + userNo.ToString() + "');</script>");
            Response.Write("<script>window.close();</script>");
        }
        catch
        {
            Response.Write("<script>alert('회수 실패 하였습니다.')</script>");
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }
示例#3
0
    private int chargePurchase(jsonVal jv)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            int cashCharge = Convert.ToInt32(jv.custom_parameter);
            int amount     = cashCharge + jv.amount;

            objDas.AddParam("@pi_intOrderNo", DBType.adBigInt, Convert.ToInt64(jv.order_no), 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strUserId", DBType.adVarChar, jv.user_id, 20, ParameterDirection.Input);
            objDas.AddParam("@pi_intAmount", DBType.adInteger, amount, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intChargeAmount", DBType.adInteger, jv.amount, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intCashAmount", DBType.adInteger, cashCharge, 0, ParameterDirection.Input);

            objDas.AddParam("@pi_strTId", DBType.adVarChar, jv.tid, 256, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);


            //프로시져 호출
            objDas.SetQuery("dbo.UP_CHARGE_PURCHASE_TX_INS"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
                return(intRetVal);
            }

            Response.Write("{\"code\":0, \"message\":\"" + jv.order_no + "," + jv.custom_parameter + "," + jv.amount + "\"}");
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }

        return(intRetVal);
    }
示例#4
0
    private int DAS_CODEPAGE = 65001;                //Define code page: UTF-8, http://ko.wikipedia.org/wiki/%EC%BD%94%EB%93%9C_%ED%8E%98%EC%9D%B4%EC%A7%80

    protected void Page_Load(object sender, EventArgs e)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;
        string json      = "";

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            Stream req = Request.InputStream;
            req.Seek(0, System.IO.SeekOrigin.Begin);
            json = new StreamReader(req).ReadToEnd();

            Log(json);

            jsonVal jv = new jsonVal();

            jv = JsonConvert.DeserializeObject <jsonVal>(json);

            objDas.AddParam("@pi_intOrderNo", DBType.adBigInt, Convert.ToInt64(jv.order_no), 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intStatus", DBType.adVarChar, 2, 0, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            objDas.SetQuery("dbo.UP_ORDER_TX_UPD"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            intRetVal = Convert.ToInt32(objDas.GetParam("@po_intRetVal"));
            strErrMsg = objDas.GetParam("@po_strMsg");

            if (intRetVal.Equals(0))
            {
                chargePurchase(jv);
            }
        }
        catch (Exception ex)
        {
            Response.Write("{\"code\":1, \"message\":\"" + ex.Message + "\"}");
        }
        finally
        {
        }
    }
示例#5
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 회원정보 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void userInfoGet(int userNo)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        ResParam objResParam = null;
        string   strErrMsg   = string.Empty;

        int totalCash = 0;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intUserNo", DBType.adInteger, userNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("dbo.UP_USER_INFO_AR_LST"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            objResParam       = new ResParam();
            objResParam.objDT = objDas.objDT;
            DataRow row = objDas.objDT.Rows[0];
            totalCash = Convert.ToInt32(row["TOTALCASH"]);

            amount.Value = totalCash.ToString();


            Response.Write("<script>window.opener.fnOrderSuccess();</script>");
            Response.Write("<script>window.close();</script>");
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }
示例#6
0
    private int chargePurchase(string orderNo)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intOrderNo", DBType.adBigInt, Convert.ToInt64(orderNo), 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strUserId", DBType.adVarChar, Page.Session["userId"], 20, ParameterDirection.Input);
            objDas.AddParam("@pi_intAmount", DBType.adInteger, amount, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intChargeAmount", DBType.adInteger, chargeAmount, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intCashAmount", DBType.adInteger, cashAmount, 0, ParameterDirection.Input);

            objDas.AddParam("@pi_strTId", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);


            //프로시져 호출
            objDas.SetQuery("dbo.UP_CHARGE_PURCHASE_TX_INS"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
                return(intRetVal);
            }
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }

        return(intRetVal);
    }
示例#7
0
    private void DisplayData(int packNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intPackNo", DBType.adInteger, packNo, 0, ParameterDirection.Input);
            objDas.AddParam("@po_strPname", DBType.adVarWChar, DBNull.Value, 20, ParameterDirection.Output);
            objDas.AddParam("@po_intPrice", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);

            //프로시져 호출
            objDas.SetQuery("UP_PACKAGE_DTL_UR_LST");     //Execute Query

            string itemList = "";
            int    totalP   = 0;

            while (objDas.Read())
            {
                packImageViewUpd.Src = objDas["PACKIMG"].ToString().Replace("D:\\WEBHOSTING\\ejdo\\User", "http://ejdo.payletter.com");
                packNameUpd.Value    = objDas.GetParam("@po_strPname");
                packCntUpd.Value     = objDas["CNT"].ToString();
                packPriceUpd.Value   = objDas.GetParam("@po_intPrice");

                itemList += objDas["itemNo"] + ",";
                totalP   += Convert.ToInt32(objDas["ITEMPRICE"]);
            }

            itemListUpd.Value = itemList;
            totalPrice.Value  = totalP.ToString();
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
        return;
    }
示例#8
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 회원정보 조회
    /// </summary>
    ///----------------------------------------------------------------------
    protected string userInfoGet(int userNo)
    {
        string userId = "";

        BOQv7Das_Net.IDas objDas = null;

        objResParam = null;
        strErrMsg   = string.Empty;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intUserNo", DBType.adInteger, userNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("dbo.UP_USER_INFO_AR_LST"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
                return(strErrMsg);
            }

            DataTable dt  = objDas.objDT;
            DataRow   row = dt.Rows[0];

            userId = row["userId"].ToString();
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }

        return(userId);
    }
示例#9
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 회원 정보 보기
    /// </summary>
    ///----------------------------------------------------------------------
    private void DisplayData(int userNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intUserNo", DBType.adInteger, userNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("dbo.UP_USER_INFO_AR_LST");     //Execute Query

            while (objDas.Read())
            {
                UserID.Value = objDas["UserId"].ToString();
                Name.Value   = objDas["Name"].ToString();
                Birth.Value  = objDas["Birth"].ToString();
                Sex.Value    = objDas["Sex"].ToString();
                Phone.Value  = objDas["Phone"].ToString();

                Email.Value    = objDas["Email"].ToString();
                postcode.Value = objDas["Postcode"].ToString();
                address1.Value = objDas["Address1"].ToString();
                address2.Value = objDas["Address2"].ToString();
            }
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
        return;
    }
示例#10
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 회원정보 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void userInfoGet(int userNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intUserNo", DBType.adInteger, userNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("dbo.UP_USER_INFO_AR_LST"); //Execute Query

            DataTable dt = objDas.objDT;
            DataRow   dr = dt.Rows[0];

            userName.Value = dr["NAME"].ToString();
            postcode.Value = dr["POSTCODE"].ToString();
            address1.Value = dr["ADDRESS1"].ToString();
            address2.Value = dr["ADDRESS2"].ToString();
            phone.Value    = dr["PHONE"].ToString();

            totalCash.Value = dr["TOTALCASH"].ToString();
            userTotalCash   = Convert.ToInt32(dr["TOTALCASH"]);
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }
示例#11
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 게시글 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void getBoardDetail(int boardNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intBoardNo", DBType.adInteger, boardNo, 0, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            //프로시져 호출
            objDas.SetQuery("UP_BOARD_DTL_AR_LST");     //Execute Query

            while (objDas.Read())
            {
                titleDetail.Value   = objDas["TITLE"].ToString();
                userIdDetail.Value  = objDas["USERID"].ToString();
                regDateDetail.Value = objDas["REGDATE"].ToString();
                contentDetail.Value = objDas["CONTENT"].ToString();
                userNoDetail.Value  = objDas["USERNO"].ToString();
            }
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
        return;
    }
示例#12
0
    private void orderSuccess(string orderNo)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;


            objDas.AddParam("@pi_intOrderNo", DBType.adBigInt, Convert.ToInt64(orderNo), 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intStatus", DBType.adVarChar, 2, 0, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            objDas.SetQuery("dbo.UP_ORDER_TX_UPD"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            intRetVal = Convert.ToInt32(objDas.GetParam("@po_intRetVal"));
            strErrMsg = objDas.GetParam("@po_strMsg");
        }
        catch (Exception ex)
        {
            Response.Write("{\"code\":1, \"message\":\"" + ex.Message + "\"}");
        }
        finally
        {
        }
    }
示例#13
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 게시글 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void DisplayData(int boardNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intBoardNo", DBType.adInteger, boardNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("UP_BOARD_DTL_AR_LST");     //Execute Query

            while (objDas.Read())
            {
                titleUpd.Value   = objDas["Title"].ToString();
                contentUpd.Value = objDas["Content"].ToString();
                if (objDas["NOTICEYN"].ToString().Equals("Y"))
                {
                    noticeYN.Checked = true;
                }
            }
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
        return;
    }
示例#14
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 패키지 상세 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void getPackageDetail(int packNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intPackNo", DBType.adInteger, packNo, 0, ParameterDirection.Input);
            objDas.AddParam("@po_strPname", DBType.adVarWChar, DBNull.Value, 20, ParameterDirection.Output);
            objDas.AddParam("@po_intPrice", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);

            //프로시져 호출
            objDas.SetQuery("dbo.UP_PACKAGE_DTL_UR_LST"); //Execute Query

            DataRow row = objDas.objDT.Rows[0];
            packImg.Src         = row["PACKIMG"].ToString().Replace("D:\\WEBHOSTING\\ejdo\\User", "");
            packName.InnerText  = objDas.GetParam("@po_strPname");
            packPrice.InnerText = objDas.GetParam("@po_intPrice");
            product_name        = objDas.GetParam("@po_strPname");
            amount = Convert.ToInt32(objDas.GetParam("@po_intPrice"));
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }
示例#15
0
    ///----------------------------------------------------------------------
    /// <summary>
    /// 상품 조회
    /// </summary>
    ///----------------------------------------------------------------------
    private void DisplayData(int itemNo)
    {
        BOQv7Das_Net.IDas objDas = null;

        try
        {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            objDas.AddParam("@pi_intitemNo", DBType.adInteger, itemNo, 0, ParameterDirection.Input);

            //프로시져 호출
            objDas.SetQuery("UP_ITEM_DTL_AR_LST");     //Execute Query

            while (objDas.Read())
            {
                itemImageViewUpd.Src    = objDas["ITEMIMG"].ToString().Replace("D:\\WEBHOSTING\\ejdo\\User", "http://ejdo.payletter.com");
                itemNameUpd.Text        = objDas["ITEMNAME"].ToString();
                itemPriceUpd.Text       = objDas["PRICE"].ToString();
                itemDetailUpd.InnerText = objDas["DETAIL"].ToString();
            }
        }
        catch
        {
        }
        finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
        return;
    }
示例#16
0
    protected void btnPay_Click(object sender, EventArgs e)
    {
        pgcode        = Request["pgCode"];
        dateRecvStart = Request.Form["dateRecvStart"];
        chargeAmount  = Convert.ToInt32(Request["chargeAmountVal"]);
        cashAmount    = Convert.ToInt32(Request["cashAmountVal"]);

        if (userTotalCash < cashAmount)
        {
            Response.Write("<script>alert('구매 실패');</script>");
            Response.Write("<script>location.href='../Item/ItemList.aspx';</script>");
            return;
        }
        else
        {
            int intRetVal            = 0;
            BOQv7Das_Net.IDas objDas = null;

            string strErrMsg = string.Empty;

            try {
                objDas = new BOQv7Das_Net.IDas();

                objDas.Open(DAS_HOST);
                objDas.CommandType = CommandType.StoredProcedure;
                objDas.CodePage    = DAS_CODEPAGE;

                objDas.AddParam("@pi_strUserId", DBType.adVarChar, Page.Session["userId"], 20, ParameterDirection.Input);
                objDas.AddParam("@pi_intPackNo", DBType.adInteger, packNo, 0, ParameterDirection.Input);
                objDas.AddParam("@pi_intChargeAmount", DBType.adInteger, chargeAmount, 0, ParameterDirection.Input);
                objDas.AddParam("@pi_intCashAmount", DBType.adInteger, cashAmount, 0, ParameterDirection.Input);
                objDas.AddParam("@pi_strDateRecvStart", DBType.adDate, dateRecvStart, 0, ParameterDirection.Input);
                objDas.AddParam("@pi_strAddress", DBType.adVarWChar, address, 100, ParameterDirection.Input);
                objDas.AddParam("@pi_strMethod", DBType.adVarChar, pgcode, 20, ParameterDirection.Input);

                objDas.AddParam("@po_intOrderNo", DBType.adBigInt, 0, 0, ParameterDirection.Output);
                objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
                objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);


                objDas.SetQuery("dbo.UP_ORDER_TX_INS"); //Execute Query

                if (!objDas.LastErrorCode.Equals(0))
                {
                    intRetVal = objDas.LastErrorCode;
                    strErrMsg = objDas.LastErrorMessage;
                }

                orderNo = objDas.GetParam("@po_intOrderNo");

                if (chargeAmount > 0)
                {
                    sendPayment(orderNo);
                }
                else
                {
                    orderSuccess(orderNo);
                    int cpRetVal = chargePurchase(orderNo);

                    if (cpRetVal == 0)
                    {
                        Response.Write("<script>fnOrderSuccess();</script>");
                        Response.Write("<script>location.href='../Membership/PurchaseList.aspx';</script>");
                    }
                }
            }
            catch
            {
            }finally
            {
                //Close
                if (objDas != null)
                {
                    objDas.Close();
                    objDas = null;
                }
            }
        }
    }
示例#17
0
    protected void addItem_Click(object sender, EventArgs e)
    {
        int intRetVal = 0;

        BOQv7Das_Net.IDas objDas = null;

        string strErrMsg = string.Empty;
        String fileName  = "";

        try {
            objDas = new BOQv7Das_Net.IDas();

            objDas.Open(DAS_HOST);
            objDas.CommandType = CommandType.StoredProcedure;
            objDas.CodePage    = DAS_CODEPAGE;

            if (packPrice.Value.Equals("0") || packPrice.Value.Equals(""))
            {
                Response.Write("<script>alert('가격을 입력해주세요.')</script>");
                return;
            }

            if (packImg.HasFile)
            {
                fileName = packImg.FileName;
                fileName = @"D:\WEBHOSTING\ejdo\User\ItemImg" + @"\" + fileName;

                packImg.SaveAs(fileName);
            }

            string itemList = Request.Form["itemCheckbox"] + ",";

            objDas.AddParam("@pi_strItemName", DBType.adVarWChar, packName.Value, 20, ParameterDirection.Input);
            objDas.AddParam("@pi_intPrice", DBType.adInteger, packPrice.Value, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_intCnt", DBType.adInteger, packCnt.Value, 0, ParameterDirection.Input);
            objDas.AddParam("@pi_strItemList", DBType.adVarChar, itemList, 300, ParameterDirection.Input);
            objDas.AddParam("@pi_strPackImg", DBType.adVarWChar, fileName, 100, ParameterDirection.Input);
            objDas.AddParam("@po_intRetVal", DBType.adInteger, DBNull.Value, 0, ParameterDirection.Output);
            objDas.AddParam("@po_strMsg", DBType.adVarChar, DBNull.Value, 256, ParameterDirection.Output);

            objDas.SetQuery("dbo.UP_PACKAGE_TX_INS"); //Execute Query

            if (!objDas.LastErrorCode.Equals(0))
            {
                intRetVal = objDas.LastErrorCode;
                strErrMsg = objDas.LastErrorMessage;
            }

            Response.Write("<script>alert('등록되었습니다.')</script>");
            Response.Write("<script>location.href='../PackageMng/PackageList.aspx'</script>");
        }catch
        {
            Response.Write("<script>alert('등록 실패 하였습니다.')</script>");
        }finally
        {
            //Close
            if (objDas != null)
            {
                objDas.Close();
                objDas = null;
            }
        }
    }