Esempio n. 1
0
        public static bool Insert(BaseStatus baseStatus, SqlConnection conn, SqlTransaction trans)
        {
            const string sql = @"
            INSERT INTO T_BASE_STATUS(STATUS_ID,STATUS_NAME,GROUP_NAME,CREATED_ON,CREATED_BY)
            VALUES(@StatusId,@StatusName,@GroupName,CONVERT(NVARCHAR(50),GETDATE(),121),@CreatedBy)

            ";

            return Dapper.Save(baseStatus, sql, conn, trans);
        }
Esempio n. 2
0
        public static bool Delete(BaseStatus baseStatus)
        {
            const string sql = @"
            DELETE FROM T_BASE_STATUS
            WHERE ID=@ID

            ";

            return Dapper.Save(baseStatus, sql);
        }
Esempio n. 3
0
        public static bool Delete(BaseStatus baseStatus, SqlConnection conn, SqlTransaction trans)
        {
            const string sql = @"
            DELETE FROM T_BASE_STATUS
            WHERE ID=@ID

            ";

            return Dapper.Save(baseStatus, sql, conn, trans);
        }
Esempio n. 4
0
        public static bool Update(BaseStatus baseStatus, SqlConnection conn, SqlTransaction trans)
        {
            const string sql = @"
            UPDATE T_BASE_STATUS
            SET STATUS_ID=@StatusId,STATUS_NAME=@StatusName,GROUP_NAME=@GroupName,CREATED_BY=@CreatedBy
            WHERE ID=@ID

            ";

            return Dapper.Save(baseStatus, sql, conn, trans);
        }