Exemplo n.º 1
0
        public bool Delete(int id)
        {
            var parameters = new List <OracleParameter> {
                new OracleParameter {
                    ParameterName = "Row_Id", OracleDbType = OracleDbType.Int32, Value = id
                }
            };

            return(db.ExecuteSqlCommand("Delete from Partner_Activity Where Row_Id=:Row_Id", parameters) > 0);
        }
Exemplo n.º 2
0
        public bool RemoveMessage(int id)
        {
            var parameters = new List <OracleParameter> {
                new OracleParameter {
                    ParameterName = "MsgId", OracleDbType = OracleDbType.Int32, Value = id
                }
            };

            return(db.ExecuteSqlCommand("Delete from SMS_OUT Where Row_Id=:MsgId", parameters) > 0);
        }
Exemplo n.º 3
0
        public bool IncreaseWrongPwdAttempts(string partnerId, bool lockAccount)
        {
            var parameters = new List <OracleParameter> {
                new OracleParameter {
                    ParameterName = "PartnerId", OracleDbType = OracleDbType.Varchar2, Value = partnerId
                },
            };

            string sql = string.Empty;

            if (lockAccount)
            {
                sql = "Update partner set WRONG_PWD_ATTEMPTS = WRONG_PWD_ATTEMPTS + 1, status = 2, statuson=sysdate, locktime = sysdate + 1/24 where partner_id = :PartnerId and status = 1";
            }
            else
            {
                sql = "Update partner set WRONG_PWD_ATTEMPTS = WRONG_PWD_ATTEMPTS + 1 where partner_id = :PartnerId and status = 1";
            }
            return(db.ExecuteSqlCommand(sql, parameters) > 0);
        }
Exemplo n.º 4
0
        public bool UpdateOrder(string actId, int msgId, int newOrder)
        {
            var parameters = new List <OracleParameter> {
                new OracleParameter {
                    ParameterName = "actId", OracleDbType = OracleDbType.Varchar2, Value = actId
                },
                new OracleParameter {
                    ParameterName = "msgId", OracleDbType = OracleDbType.Int32, Value = msgId
                }
                //new OracleParameter{ ParameterName = "MOrder", OracleDbType = OracleDbType.Int32,  Value = newOrder }
            };
            var result = db.ExecuteSqlCommand("UPDATE ACTIVITY_MESSAGE SET msg_order=" + newOrder + " WHERE act_id=:actId AND msg_id=:msgId", parameters);

            return(result > 0);
        }