Exemplo n.º 1
0
        public bool InsertAccount(HouseKeep_PaymentVO payment)
        {
            DataSet ds    = new DataSet();
            string  query = string.Empty;

            try
            {
                query = @"
            INSERT INTO PAY_T(
                PAY_NAME
                ,US_EMAIL
                ,PAY_TYPE
            )
            VALUES(
                '#PAY_NAME'
                ,'#US_EMAIL'
                ,'#PAY_TYPE'
             )";

                query = query.Replace("#PAY_NAME", payment.PayName);
                query = query.Replace("#US_EMAIL", payment.Email);
                query = query.Replace("#PAY_TYPE", "" + payment.payType);
                int result = db.ExecuteNonQuery(query);
                if (result > 0)
                {
                    return(true);
                }
                return(false);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
        }
Exemplo n.º 2
0
        public bool purchaseShpList(string shopNo)
        {
            DataSet ds    = new DataSet();
            string  query = string.Empty;

            try
            {
                query = @"
            UPDATE root2.shop_t
               SET
                    SHP_STATE = '#SHP_STATE',
                    BUY_DATE = sysdate
               WHERE
                    SHOP_NO = '#SHOP_NO'
                ";

                query = query.Replace("#SHOP_NO", shopNo);
                query = query.Replace("#SHP_STATE", "" + 1);

                int result = db.ExecuteNonQuery(query);
                if (result > 0)
                {
                    return(true);
                }
                return(false);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
        }